net.maizegenetics.dna.snp.score.MaskDosage Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tassel Show documentation
Show all versions of tassel Show documentation
TASSEL is a software package to evaluate traits associations, evolutionary patterns, and linkage
disequilibrium.
The newest version!
/*
* MaskDosage
*
* Created on Dec 16, 2016
*/
package net.maizegenetics.dna.snp.score;
import net.maizegenetics.dna.snp.MaskMatrix;
/**
*
* @author Terry Casstevens
*/
public class MaskDosage extends Dosage {
private final Dosage myBase;
private final MaskMatrix myMask;
MaskDosage(Dosage dosage, MaskMatrix mask) {
super(mask.numTaxa(), mask.numSites());
myBase = dosage;
myMask = mask;
}
@Override
public byte value(int taxon, int site) {
if (myMask.get(taxon, site)) {
return 0;
}
return myBase.value(taxon, site);
}
}