Don't check het count when there are multiple Genotypes per Variation.

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@2304 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
ebanks 2009-12-10 04:07:47 +00:00
parent ee691b8899
commit 78d5ac9bc2
1 changed files with 5 additions and 3 deletions

View File

@ -31,9 +31,11 @@ public class VariantCounter extends BasicVariantAnalysis implements GenotypeAnal
public String update(Variation eval, RefMetaDataTracker tracker, char ref, AlignmentContext context) {
nSNPs += eval == null ? 0 : 1;
if ( this.getMaster().evalContainsGenotypes && eval != null ) {
Genotype genotype = ((VariantBackedByGenotype)eval).getCalledGenotype();
if ( eval.isSNP() && eval.isBiallelic() && genotype.isHet() ) {
// TODO -- break the het check out to a different module used only for single samples
if ( this.getMaster().evalContainsGenotypes && eval != null && eval.isBiallelic() && eval.isSNP() ) {
List<Genotype> genotypes = ((VariantBackedByGenotype)eval).getGenotypes();
if ( genotypes.size() == 1 && genotypes.get(0).isHet() ) {
nHets++;
}
}