Class Mutect2Engine
java.lang.Object
org.broadinstitute.hellbender.tools.walkers.mutect.Mutect2Engine
- All Implemented Interfaces:
AutoCloseable
,AssemblyRegionEvaluator
Created by davidben on 9/15/16.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMutect2Engine
(M2ArgumentCollection MTAC, AssemblyRegionArgumentCollection assemblyRegionArgs, boolean createBamOutIndex, boolean createBamOutMD5, htsjdk.samtools.SAMFileHeader header, GATKPath referenceSpec, VariantAnnotatorEngine annotatorEngine) Create and initialize a new HaplotypeCallerEngine given a collection of HaplotypeCaller arguments, a reads header, and a reference file -
Method Summary
Modifier and TypeMethodDescriptionList<htsjdk.variant.variantcontext.VariantContext>
callRegion
(AssemblyRegion originalAssemblyRegion, ReferenceContext referenceContext, FeatureContext featureContext) void
close()
boolean
Are we emitting a reference confidence in some form, or not?getAttributeAsDoubleList
(htsjdk.variant.variantcontext.VariantContext vc, String key, double defaultValue) static List<Class<? extends Annotation>>
isActive
(AlignmentContext context, ReferenceContext ref, FeatureContext features) Given a pileup over a single locus, returns an ActivityProfileState containing the probability (0.0 to 1.0) that the locus is an "active" site.static double
logLikelihoodRatio
(int refCount, int altCount, double errorProbability) static double
logLikelihoodRatio
(int refCount, List<Byte> altQuals) static double
logLikelihoodRatio
(int nRef, List<Byte> altQuals, int repeatFactor) static double
logLikelihoodRatio
(int nRef, List<Byte> altQuals, int repeatFactor, Optional<BetaDistributionShape> afPrior) this implements the isActive() algorithm described in docs/mutect/mutect.pdf the multiplicative factor is for the special case where we pass a singleton list of alt quals and want to duplicate that alt qual over multiple readsstatic ReadTransformer
makeStandardMutect2PostFilterReadTransformer
(Path referencePath, boolean clipITRArtifacts) static List<ReadFilter>
splitReadsBySample
(Collection<GATKRead> reads) void
writeExtraOutputs
(File statsTable) void
writeHeader
(htsjdk.variant.variantcontext.writer.VariantContextWriter vcfWriter, Set<htsjdk.variant.vcf.VCFHeaderLine> defaultToolHeaderLines)
-
Field Details
-
TUMOR_SAMPLE_KEY_IN_VCF_HEADER
- See Also:
-
NORMAL_SAMPLE_KEY_IN_VCF_HEADER
- See Also:
-
INDEL_START_QUAL
public static final int INDEL_START_QUAL- See Also:
-
INDEL_CONTINUATION_QUAL
public static final int INDEL_CONTINUATION_QUAL- See Also:
-
MAX_ALT_FRACTION_IN_NORMAL
public static final double MAX_ALT_FRACTION_IN_NORMAL- See Also:
-
MAX_NORMAL_QUAL_SUM
public static final int MAX_NORMAL_QUAL_SUM- See Also:
-
MIN_PALINDROME_SIZE
public static final int MIN_PALINDROME_SIZE- See Also:
-
HUGE_FRAGMENT_LENGTH
public static final int HUGE_FRAGMENT_LENGTH- See Also:
-
MIN_TAIL_QUALITY
public static final int MIN_TAIL_QUALITY- See Also:
-
CALLABLE_SITES_NAME
- See Also:
-
MINIMUM_BASE_QUALITY
public static final int MINIMUM_BASE_QUALITY- See Also:
-
-
Constructor Details
-
Mutect2Engine
public Mutect2Engine(M2ArgumentCollection MTAC, AssemblyRegionArgumentCollection assemblyRegionArgs, boolean createBamOutIndex, boolean createBamOutMD5, htsjdk.samtools.SAMFileHeader header, GATKPath referenceSpec, VariantAnnotatorEngine annotatorEngine) Create and initialize a new HaplotypeCallerEngine given a collection of HaplotypeCaller arguments, a reads header, and a reference file- Parameters:
MTAC
- command-line arguments for the HaplotypeCallerassemblyRegionArgs
-createBamOutIndex
- true to create an index file for the bamoutcreateBamOutMD5
- true to create an md5 file for the bamoutheader
- header for the readsreferenceSpec
- reference specifier for the referenceannotatorEngine
- annotator engine built with desired annotations
-
-
Method Details
-
makeStandardMutect2ReadFilters
-
makeStandardMutect2PostFilterReadTransformer
public static ReadTransformer makeStandardMutect2PostFilterReadTransformer(Path referencePath, boolean clipITRArtifacts) -
getStandardMutect2AnnotationGroups
- Returns:
- the default set of variant annotations for Mutect2
-
writeHeader
public void writeHeader(htsjdk.variant.variantcontext.writer.VariantContextWriter vcfWriter, Set<htsjdk.variant.vcf.VCFHeaderLine> defaultToolHeaderLines) -
callRegion
public List<htsjdk.variant.variantcontext.VariantContext> callRegion(AssemblyRegion originalAssemblyRegion, ReferenceContext referenceContext, FeatureContext featureContext) -
splitReadsBySample
-
writeExtraOutputs
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
isActive
public ActivityProfileState isActive(AlignmentContext context, ReferenceContext ref, FeatureContext features) Description copied from interface:AssemblyRegionEvaluator
Given a pileup over a single locus, returns an ActivityProfileState containing the probability (0.0 to 1.0) that the locus is an "active" site.- Specified by:
isActive
in interfaceAssemblyRegionEvaluator
- Parameters:
context
- reads pileup to examineref
- reference base overlapping the pileup locusfeatures
- features overlapping the pileup locus- Returns:
- ActivityProfileState containing the probability between 0.0 and 1.0 that the site is active
-
getAttributeAsDoubleList
-
emitReferenceConfidence
public boolean emitReferenceConfidence()Are we emitting a reference confidence in some form, or not?- Returns:
- true if HC must emit reference confidence.
-
logLikelihoodRatio
-
logLikelihoodRatio
public static double logLikelihoodRatio(int nRef, List<Byte> altQuals, int repeatFactor, Optional<BetaDistributionShape> afPrior) this implements the isActive() algorithm described in docs/mutect/mutect.pdf the multiplicative factor is for the special case where we pass a singleton list of alt quals and want to duplicate that alt qual over multiple reads- Parameters:
nRef
- ref read countaltQuals
- Phred-scaled qualities of alt-supporting readsrepeatFactor
- Number of times each alt qual is duplicatedafPrior
- Beta prior on alt allele fraction- Returns:
-
logLikelihoodRatio
-
logLikelihoodRatio
public static double logLikelihoodRatio(int refCount, int altCount, double errorProbability)
-