Minor patches to get the contamination down-sampling working for indels. Adding @Hidden logging output for easy debugging.
This commit is contained in:
parent
c6b57fffda
commit
72714ee43e
|
|
@ -56,7 +56,8 @@ public class AdvancedPerReadAlleleLikelihoodMap extends StandardPerReadAlleleLik
|
||||||
|
|
||||||
for ( Map.Entry<GATKSAMRecord, Map<Allele, Double>> entry : likelihoodReadMap.entrySet() ) {
|
for ( Map.Entry<GATKSAMRecord, Map<Allele, Double>> entry : likelihoodReadMap.entrySet() ) {
|
||||||
final Allele bestAllele = getMostLikelyAllele(entry.getValue());
|
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
|
// compute the reads to remove and actually remove them
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ public class StandardCallerArgumentCollection {
|
||||||
public double CONTAMINATION_FRACTION = 0.0;
|
public double CONTAMINATION_FRACTION = 0.0;
|
||||||
|
|
||||||
@Hidden
|
@Hidden
|
||||||
@Argument(shortName = "logRemovedReadsFromContaminationFiltering", doc="contaminationLog", required=false)
|
@Argument(fullName = "logRemovedReadsFromContaminationFiltering", shortName="contaminationLog", required=false)
|
||||||
public PrintStream contaminationLog = null;
|
public PrintStream contaminationLog = null;
|
||||||
|
|
||||||
@Hidden
|
@Hidden
|
||||||
|
|
|
||||||
|
|
@ -234,36 +234,21 @@ public class UnifiedGenotyper extends LocusWalker<List<VariantCallContext>, Unif
|
||||||
if (UAC.samplePloidy != VariantContextUtils.DEFAULT_PLOIDY ||
|
if (UAC.samplePloidy != VariantContextUtils.DEFAULT_PLOIDY ||
|
||||||
UAC.referenceSampleName != null ||
|
UAC.referenceSampleName != null ||
|
||||||
UAC.referenceSampleRod.isBound()) {
|
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
|
// get all of the unique sample names
|
||||||
samples = SampleUtils.getSAMFileSamples(getToolkit().getSAMFileHeader());
|
samples = SampleUtils.getSAMFileSamples(getToolkit().getSAMFileHeader());
|
||||||
|
if ( UAC.referenceSampleName != null )
|
||||||
} else {
|
samples.remove(UAC.referenceSampleName);
|
||||||
// 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);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// check for a bad max alleles value
|
// check for a bad max alleles value
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue