Replace string literals for annotation groups. Closes #1216.
This commit is contained in:
parent
70b259a3fb
commit
c040da427d
|
|
@ -1066,7 +1066,7 @@ public class MuTect2 extends ActiveRegionWalker<List<VariantContext>, Integer> i
|
||||||
* Which groups of annotations to add to the output VCF file. See the VariantAnnotator -list argument to view available groups.
|
* Which groups of annotations to add to the output VCF file. See the VariantAnnotator -list argument to view available groups.
|
||||||
*/
|
*/
|
||||||
@Argument(fullName="group", shortName="G", doc="One or more classes/groups of annotations to apply to variant calls", required=false)
|
@Argument(fullName="group", shortName="G", doc="One or more classes/groups of annotations to apply to variant calls", required=false)
|
||||||
//protected String[] annotationGroupsToUse = { "Standard" };
|
//protected String[] annotationGroupsToUse = { StandardAnnotation.class.getSimpleName() };
|
||||||
protected String[] annotationClassesToUse = { };
|
protected String[] annotationClassesToUse = { };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -62,6 +62,8 @@ import org.broadinstitute.gatk.engine.GenomeAnalysisEngine;
|
||||||
import org.broadinstitute.gatk.engine.arguments.DbsnpArgumentCollection;
|
import org.broadinstitute.gatk.engine.arguments.DbsnpArgumentCollection;
|
||||||
import org.broadinstitute.gatk.engine.io.DirectOutputTracker;
|
import org.broadinstitute.gatk.engine.io.DirectOutputTracker;
|
||||||
import org.broadinstitute.gatk.engine.io.stubs.SAMFileWriterStub;
|
import org.broadinstitute.gatk.engine.io.stubs.SAMFileWriterStub;
|
||||||
|
import org.broadinstitute.gatk.tools.walkers.annotator.interfaces.StandardAnnotation;
|
||||||
|
import org.broadinstitute.gatk.tools.walkers.annotator.interfaces.StandardHCAnnotation;
|
||||||
import org.broadinstitute.gatk.utils.contexts.AlignmentContext;
|
import org.broadinstitute.gatk.utils.contexts.AlignmentContext;
|
||||||
import org.broadinstitute.gatk.utils.contexts.AlignmentContextUtils;
|
import org.broadinstitute.gatk.utils.contexts.AlignmentContextUtils;
|
||||||
import org.broadinstitute.gatk.utils.contexts.ReferenceContext;
|
import org.broadinstitute.gatk.utils.contexts.ReferenceContext;
|
||||||
|
|
@ -328,7 +330,7 @@ public class HaplotypeCaller extends ActiveRegionWalker<List<VariantContext>, In
|
||||||
* to provide a pedigree file for a pedigree-based annotation) may cause the run to fail.
|
* to provide a pedigree file for a pedigree-based annotation) may cause the run to fail.
|
||||||
*/
|
*/
|
||||||
@Argument(fullName="group", shortName="G", doc="One or more classes/groups of annotations to apply to variant calls", required=false)
|
@Argument(fullName="group", shortName="G", doc="One or more classes/groups of annotations to apply to variant calls", required=false)
|
||||||
protected List<String> annotationGroupsToUse = new ArrayList<>(Arrays.asList(new String[]{ "Standard", "StandardHCAnnotation" }));
|
protected List<String> annotationGroupsToUse = new ArrayList<>(Arrays.asList(new String[]{StandardAnnotation.class.getSimpleName(), StandardHCAnnotation.class.getSimpleName() }));
|
||||||
|
|
||||||
@ArgumentCollection
|
@ArgumentCollection
|
||||||
private HaplotypeCallerArgumentCollection HCAC = new HaplotypeCallerArgumentCollection();
|
private HaplotypeCallerArgumentCollection HCAC = new HaplotypeCallerArgumentCollection();
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,7 @@ package org.broadinstitute.gatk.tools.walkers.variantutils;
|
||||||
import org.broadinstitute.gatk.engine.arguments.DbsnpArgumentCollection;
|
import org.broadinstitute.gatk.engine.arguments.DbsnpArgumentCollection;
|
||||||
import org.broadinstitute.gatk.tools.walkers.annotator.VariantAnnotatorEngine;
|
import org.broadinstitute.gatk.tools.walkers.annotator.VariantAnnotatorEngine;
|
||||||
import org.broadinstitute.gatk.tools.walkers.annotator.interfaces.AnnotatorCompatible;
|
import org.broadinstitute.gatk.tools.walkers.annotator.interfaces.AnnotatorCompatible;
|
||||||
|
import org.broadinstitute.gatk.tools.walkers.annotator.interfaces.StandardAnnotation;
|
||||||
import org.broadinstitute.gatk.utils.commandline.*;
|
import org.broadinstitute.gatk.utils.commandline.*;
|
||||||
import org.broadinstitute.gatk.engine.CommandLineGATK;
|
import org.broadinstitute.gatk.engine.CommandLineGATK;
|
||||||
import org.broadinstitute.gatk.utils.contexts.AlignmentContext;
|
import org.broadinstitute.gatk.utils.contexts.AlignmentContext;
|
||||||
|
|
@ -129,7 +130,7 @@ public class CombineGVCFs extends RodWalker<CombineGVCFs.PositionalState, Combin
|
||||||
* to provide a pedigree file for a pedigree-based annotation) may cause the run to fail.
|
* to provide a pedigree file for a pedigree-based annotation) may cause the run to fail.
|
||||||
*/
|
*/
|
||||||
@Argument(fullName="group", shortName="G", doc="One or more classes/groups of annotations to apply to variant calls", required=false)
|
@Argument(fullName="group", shortName="G", doc="One or more classes/groups of annotations to apply to variant calls", required=false)
|
||||||
protected String[] annotationGroupsToUse = { "Standard" };
|
protected String[] annotationGroupsToUse = { StandardAnnotation.class.getSimpleName() };
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,9 @@ import org.broadinstitute.gatk.engine.walkers.RodWalker;
|
||||||
import org.broadinstitute.gatk.engine.walkers.TreeReducible;
|
import org.broadinstitute.gatk.engine.walkers.TreeReducible;
|
||||||
import org.broadinstitute.gatk.engine.walkers.Window;
|
import org.broadinstitute.gatk.engine.walkers.Window;
|
||||||
import org.broadinstitute.gatk.tools.walkers.annotator.VariantAnnotatorEngine;
|
import org.broadinstitute.gatk.tools.walkers.annotator.VariantAnnotatorEngine;
|
||||||
|
import org.broadinstitute.gatk.tools.walkers.annotator.interfaces.AS_StandardAnnotation;
|
||||||
import org.broadinstitute.gatk.tools.walkers.annotator.interfaces.AnnotatorCompatible;
|
import org.broadinstitute.gatk.tools.walkers.annotator.interfaces.AnnotatorCompatible;
|
||||||
|
import org.broadinstitute.gatk.tools.walkers.annotator.interfaces.StandardAnnotation;
|
||||||
import org.broadinstitute.gatk.tools.walkers.genotyper.UnifiedArgumentCollection;
|
import org.broadinstitute.gatk.tools.walkers.genotyper.UnifiedArgumentCollection;
|
||||||
import org.broadinstitute.gatk.tools.walkers.genotyper.UnifiedGenotypingEngine;
|
import org.broadinstitute.gatk.tools.walkers.genotyper.UnifiedGenotypingEngine;
|
||||||
import org.broadinstitute.gatk.tools.walkers.genotyper.afcalc.GeneralPloidyFailOverAFCalculatorProvider;
|
import org.broadinstitute.gatk.tools.walkers.genotyper.afcalc.GeneralPloidyFailOverAFCalculatorProvider;
|
||||||
|
|
@ -169,7 +171,7 @@ public class GenotypeGVCFs extends RodWalker<VariantContext, VariantContextWrite
|
||||||
* to provide a pedigree file for a pedigree-based annotation) may cause the run to fail.
|
* to provide a pedigree file for a pedigree-based annotation) may cause the run to fail.
|
||||||
*/
|
*/
|
||||||
@Argument(fullName="group", shortName="G", doc="One or more classes/groups of annotations to apply to variant calls", required=false)
|
@Argument(fullName="group", shortName="G", doc="One or more classes/groups of annotations to apply to variant calls", required=false)
|
||||||
protected List<String> annotationGroupsToUse = new ArrayList<>(Arrays.asList(new String[]{"Standard"}));
|
protected List<String> annotationGroupsToUse = new ArrayList<>(Arrays.asList(new String[]{StandardAnnotation.class.getSimpleName()}));
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -222,9 +224,13 @@ public class GenotypeGVCFs extends RodWalker<VariantContext, VariantContextWrite
|
||||||
annotationEngine = new VariantAnnotatorEngine(annotationGroupsToUse, annotationsToUse, Collections.<String>emptyList(), this, toolkit);
|
annotationEngine = new VariantAnnotatorEngine(annotationGroupsToUse, annotationsToUse, Collections.<String>emptyList(), this, toolkit);
|
||||||
|
|
||||||
// create the genotyping engine
|
// create the genotyping engine
|
||||||
boolean doAlleleSpecificGenotyping = annotationsToUse.contains(GATKVCFConstants.AS_QUAL_BY_DEPTH_KEY) || annotationGroupsToUse.contains("AS_Standard");
|
// when checking for presence of AS_StandardAnnotation we must deal with annoying feature that
|
||||||
genotypingEngine = new UnifiedGenotypingEngine(createUAC(), samples, toolkit.getGenomeLocParser(), GeneralPloidyFailOverAFCalculatorProvider.createThreadSafeProvider(toolkit, genotypeArgs, logger),
|
// the class name with or without the trailing "Annotation" are both valid command lines
|
||||||
toolkit.getArguments().BAQMode, doAlleleSpecificGenotyping);
|
boolean doAlleleSpecificGenotyping = annotationsToUse.contains(GATKVCFConstants.AS_QUAL_BY_DEPTH_KEY)
|
||||||
|
|| annotationGroupsToUse.contains(AS_StandardAnnotation.class.getSimpleName())
|
||||||
|
|| annotationGroupsToUse.contains(AS_StandardAnnotation.class.getSimpleName().replace("Annotation", ""));
|
||||||
|
genotypingEngine = new UnifiedGenotypingEngine(createUAC(), samples, toolkit.getGenomeLocParser(),
|
||||||
|
GeneralPloidyFailOverAFCalculatorProvider.createThreadSafeProvider(toolkit, genotypeArgs, logger), toolkit.getArguments().BAQMode, doAlleleSpecificGenotyping);
|
||||||
|
|
||||||
// take care of the VCF headers
|
// take care of the VCF headers
|
||||||
final Set<VCFHeaderLine> headerLines = VCFUtils.smartMergeHeaders(vcfRods.values(), true);
|
final Set<VCFHeaderLine> headerLines = VCFUtils.smartMergeHeaders(vcfRods.values(), true);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue