The DP in the FORMAT field (per sample) must also use the representative count or else it's always 1 for reduced reads.

This commit is contained in:
Eric Banks 2011-11-15 10:23:59 -05:00
parent b66556f4a0
commit b45d10e6f1
1 changed files with 4 additions and 6 deletions

View File

@ -26,7 +26,6 @@
package org.broadinstitute.sting.gatk.walkers.genotyper; package org.broadinstitute.sting.gatk.walkers.genotyper;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
import org.broadinstitute.sting.commandline.RodBinding;
import org.broadinstitute.sting.gatk.contexts.AlignmentContext; import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
import org.broadinstitute.sting.gatk.contexts.AlignmentContextUtils; import org.broadinstitute.sting.gatk.contexts.AlignmentContextUtils;
import org.broadinstitute.sting.gatk.contexts.ReferenceContext; import org.broadinstitute.sting.gatk.contexts.ReferenceContext;
@ -36,7 +35,6 @@ import org.broadinstitute.sting.utils.exceptions.ReviewedStingException;
import org.broadinstitute.sting.utils.pileup.PileupElement; import org.broadinstitute.sting.utils.pileup.PileupElement;
import org.broadinstitute.sting.utils.pileup.ReadBackedPileup; import org.broadinstitute.sting.utils.pileup.ReadBackedPileup;
import org.broadinstitute.sting.utils.variantcontext.Allele; import org.broadinstitute.sting.utils.variantcontext.Allele;
import org.broadinstitute.sting.utils.variantcontext.VariantContext;
import java.util.Map; import java.util.Map;
@ -83,8 +81,7 @@ public abstract class GenotypeLikelihoodsCalculationModel implements Cloneable {
* @param priors priors to use for GLs * @param priors priors to use for GLs
* @param GLs hash of sample->GL to fill in * @param GLs hash of sample->GL to fill in
* @param alternateAlleleToUse the alternate allele to use, null if not set * @param alternateAlleleToUse the alternate allele to use, null if not set
* * @param useBAQedPileup should we use the BAQed pileup or the raw one?
* @param useBAQedPileup
* @return genotype likelihoods per sample for AA, AB, BB * @return genotype likelihoods per sample for AA, AB, BB
*/ */
public abstract Allele getLikelihoods(RefMetaDataTracker tracker, public abstract Allele getLikelihoods(RefMetaDataTracker tracker,
@ -93,13 +90,14 @@ public abstract class GenotypeLikelihoodsCalculationModel implements Cloneable {
AlignmentContextUtils.ReadOrientation contextType, AlignmentContextUtils.ReadOrientation contextType,
GenotypePriors priors, GenotypePriors priors,
Map<String, MultiallelicGenotypeLikelihoods> GLs, Map<String, MultiallelicGenotypeLikelihoods> GLs,
Allele alternateAlleleToUse, boolean useBAQedPileup); Allele alternateAlleleToUse,
boolean useBAQedPileup);
protected int getFilteredDepth(ReadBackedPileup pileup) { protected int getFilteredDepth(ReadBackedPileup pileup) {
int count = 0; int count = 0;
for ( PileupElement p : pileup ) { for ( PileupElement p : pileup ) {
if ( BaseUtils.isRegularBase( p.getBase() ) ) if ( BaseUtils.isRegularBase( p.getBase() ) )
count++; count += p.getRepresentativeCount();
} }
return count; return count;