Minor patches to get the contamination down-sampling working for indels. Adding @Hidden logging output for easy debugging.

This commit is contained in:
Eric Banks 2012-10-25 02:47:42 -04:00
parent c6b57fffda
commit 72714ee43e
3 changed files with 15 additions and 29 deletions

View File

@ -56,7 +56,8 @@ public class AdvancedPerReadAlleleLikelihoodMap extends StandardPerReadAlleleLik
for ( Map.Entry<GATKSAMRecord, Map<Allele, Double>> entry : likelihoodReadMap.entrySet() ) {
final Allele bestAllele = getMostLikelyAllele(entry.getValue());
alleleReadMap.get(bestAllele).add(entry.getKey());
if ( bestAllele != Allele.NO_CALL )
alleleReadMap.get(bestAllele).add(entry.getKey());
}
// compute the reads to remove and actually remove them

View File

@ -79,7 +79,7 @@ public class StandardCallerArgumentCollection {
public double CONTAMINATION_FRACTION = 0.0;
@Hidden
@Argument(shortName = "logRemovedReadsFromContaminationFiltering", doc="contaminationLog", required=false)
@Argument(fullName = "logRemovedReadsFromContaminationFiltering", shortName="contaminationLog", required=false)
public PrintStream contaminationLog = null;
@Hidden

View File

@ -234,36 +234,21 @@ public class UnifiedGenotyper extends LocusWalker<List<VariantCallContext>, Unif
if (UAC.samplePloidy != VariantContextUtils.DEFAULT_PLOIDY ||
UAC.referenceSampleName != null ||
UAC.referenceSampleRod.isBound()) {
throw new UserException.NotSupportedInGATKLite("Usage of ploidy values different than 2 not supported in this GATK version");
throw new UserException.NotSupportedInGATKLite("you cannot enable usage of ploidy values other than 2");
}
if ( UAC.CONTAMINATION_FRACTION > 0.0 ) {
throw new UserException.NotSupportedInGATKLite("you cannot enable usage of contamination down-sampling");
}
}
if ( UAC.TREAT_ALL_READS_AS_SINGLE_POOL ) {
samples.add(GenotypeLikelihoodsCalculationModel.DUMMY_SAMPLE_NAME);
} else {
// get all of the unique sample names
samples = SampleUtils.getSAMFileSamples(getToolkit().getSAMFileHeader());
} else {
// in full mode: check for consistency in ploidy/pool calling arguments
// check for correct calculation models
/* if (UAC.samplePloidy != VariantContextUtils.DEFAULT_PLOIDY) {
// polyploidy requires POOL GL and AF calculation models to be specified right now
if (UAC.GLmodel != GenotypeLikelihoodsCalculationModel.Model.POOLSNP && UAC.GLmodel != GenotypeLikelihoodsCalculationModel.Model.POOLINDEL
&& UAC.GLmodel != GenotypeLikelihoodsCalculationModel.Model.POOLBOTH) {
throw new UserException("Incorrect genotype calculation model chosen. Only [POOLSNP|POOLINDEL|POOLBOTH] supported with this walker if sample ploidy != 2");
}
if (UAC.AFmodel != AFCalc.Model.POOL)
throw new UserException("Incorrect AF Calculation model. Only POOL model supported if sample ploidy != 2");
}
*/
// get all of the unique sample names
if (UAC.TREAT_ALL_READS_AS_SINGLE_POOL) {
samples.clear();
samples.add(GenotypeLikelihoodsCalculationModel.DUMMY_SAMPLE_NAME);
} else {
samples = SampleUtils.getSAMFileSamples(getToolkit().getSAMFileHeader());
if (UAC.referenceSampleName != null )
samples.remove(UAC.referenceSampleName);
}
if ( UAC.referenceSampleName != null )
samples.remove(UAC.referenceSampleName);
}
// check for a bad max alleles value