All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.maizegenetics.dna.snp.score.MaskReferenceProbability Maven / Gradle / Ivy

Go to download

TASSEL is a software package to evaluate traits associations, evolutionary patterns, and linkage disequilibrium.

The newest version!
/*
 *  MaskReferenceProbability
 * 
 *  Created on Dec 16, 2016
 */
package net.maizegenetics.dna.snp.score;

import net.maizegenetics.dna.snp.MaskMatrix;

/**
 *
 * @author Terry Casstevens
 */
public class MaskReferenceProbability extends ReferenceProbability {

    private final ReferenceProbability myBase;
    private final MaskMatrix myMask;

    MaskReferenceProbability(ReferenceProbability referenceProbability, MaskMatrix mask) {
        super(mask.numTaxa(), mask.numSites());
        myBase = referenceProbability;
        myMask = mask;
    }

    @Override
    public float value(int taxon, int site) {
        if (myMask.get(taxon, site)) {
            return 0.0f;
        }
        return myBase.value(taxon, site);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy