public abstract class AssemblyBasedCallerGenotypingEngine extends GenotypingEngine<AssemblyBasedCallerArgumentCollection>
Modifier and Type | Class and Description |
---|---|
static class |
AssemblyBasedCallerGenotypingEngine.CalledHaplotypes
Carries the result of a call to #assignGenotypeLikelihoods
|
Modifier and Type | Field and Description |
---|---|
protected static int |
ALLELE_EXTENSION |
protected boolean |
doPhysicalPhasing |
afCalculatorProvider, annotationEngine, configuration, logger, newAFCalculator, numberOfGenomes, samples
Constructor and Description |
---|
AssemblyBasedCallerGenotypingEngine(AssemblyBasedCallerArgumentCollection configuration,
SampleList samples,
AFCalculatorProvider afCalculatorProvider,
boolean doPhysicalPhasing) |
Modifier and Type | Method and Description |
---|---|
protected static java.util.Map<htsjdk.variant.variantcontext.VariantContext,java.util.Set<Haplotype>> |
constructHaplotypeMapping(java.util.List<htsjdk.variant.variantcontext.VariantContext> originalCalls,
java.util.Set<Haplotype> calledHaplotypes)
Construct the mapping from alternate allele to the set of haplotypes that contain that allele
|
protected static java.util.List<htsjdk.variant.variantcontext.VariantContext> |
constructPhaseGroups(java.util.List<htsjdk.variant.variantcontext.VariantContext> originalCalls,
java.util.Map<htsjdk.variant.variantcontext.VariantContext,org.apache.commons.lang3.tuple.Pair<java.lang.Integer,java.lang.String>> phaseSetMapping,
int indexTo)
Assemble the phase groups together and update the original calls accordingly
|
protected static int |
constructPhaseSetMapping(java.util.List<htsjdk.variant.variantcontext.VariantContext> originalCalls,
java.util.Map<htsjdk.variant.variantcontext.VariantContext,java.util.Set<Haplotype>> haplotypeMap,
int totalAvailableHaplotypes,
java.util.Map<htsjdk.variant.variantcontext.VariantContext,org.apache.commons.lang3.tuple.Pair<java.lang.Integer,java.lang.String>> phaseSetMapping)
Construct the mapping from call (variant context) to phase set ID
|
protected static java.util.Map<htsjdk.variant.variantcontext.Allele,java.util.List<Haplotype>> |
createAlleleMapper(java.util.List<htsjdk.variant.variantcontext.VariantContext> eventsAtThisLoc,
htsjdk.variant.variantcontext.VariantContext mergedVC,
int loc,
java.util.List<Haplotype> haplotypes) |
protected java.util.TreeSet<java.lang.Integer> |
decomposeHaplotypesIntoVariantContexts(java.util.List<Haplotype> haplotypes,
byte[] ref,
SimpleInterval refLoc,
java.util.List<htsjdk.variant.variantcontext.VariantContext> activeAllelesToGenotype,
int maxMnpDistance)
Go through the haplotypes we assembled, and decompose them into their constituent variant contexts
|
protected boolean |
forceSiteEmission()
Indicates whether we have to emit any site no matter what.
|
protected static java.util.List<htsjdk.variant.variantcontext.VariantContext> |
getVCsAtThisLocation(java.util.List<Haplotype> haplotypes,
int loc,
java.util.List<htsjdk.variant.variantcontext.VariantContext> activeAllelesToGenotype) |
protected static java.util.List<htsjdk.variant.variantcontext.VariantContext> |
phaseCalls(java.util.List<htsjdk.variant.variantcontext.VariantContext> calls,
java.util.Set<Haplotype> calledHaplotypes)
Tries to phase the individual alleles based on pairwise comparisons to the other alleles based on all called haplotypes
|
protected ReadLikelihoods<htsjdk.variant.variantcontext.Allele> |
prepareReadAlleleLikelihoodsForAnnotation(ReadLikelihoods<Haplotype> readHaplotypeLikelihoods,
java.util.Map<java.lang.String,java.util.List<GATKRead>> perSampleFilteredReadList,
boolean emitReferenceConfidence,
java.util.Map<htsjdk.variant.variantcontext.Allele,java.util.List<Haplotype>> alleleMapper,
ReadLikelihoods<htsjdk.variant.variantcontext.Allele> readAlleleLikelihoodsForGenotyping,
htsjdk.variant.variantcontext.VariantContext call) |
calculateGenotypes, calculateGenotypes, calculateSingleSampleRefVsAnyActiveStateProfileValue, callSourceString, composeAlleleFrequencyPriorProvider, composeCallAttributes, computeAlleleFrequencyPriors, confidentlyCalled, emptyCallContext, estimateLog10ReferenceConfidenceForOneSample, estimateReferenceConfidence, forceKeepAllele, getAlleleFrequencyPriors, getAppropriateVCFInfoHeaders, getConfiguration, hasTooManyAlternativeAlleles, passesCallThreshold, passesEmitThreshold, setAnnotationEngine, setLogger
protected static final int ALLELE_EXTENSION
protected final boolean doPhysicalPhasing
public AssemblyBasedCallerGenotypingEngine(AssemblyBasedCallerArgumentCollection configuration, SampleList samples, AFCalculatorProvider afCalculatorProvider, boolean doPhysicalPhasing)
configuration
- samples
- doPhysicalPhasing
- whether to try physical phasing.protected boolean forceSiteEmission()
GenotypingEngine
Note: this has been added to allow differences between UG and HC GGA modes where the latter force emmitions of all given alleles sites even if there is no enough confidence.
forceSiteEmission
in class GenotypingEngine<AssemblyBasedCallerArgumentCollection>
true
iff we force emissions.protected java.util.TreeSet<java.lang.Integer> decomposeHaplotypesIntoVariantContexts(java.util.List<Haplotype> haplotypes, byte[] ref, SimpleInterval refLoc, java.util.List<htsjdk.variant.variantcontext.VariantContext> activeAllelesToGenotype, int maxMnpDistance)
haplotypes
- the list of haplotypes we're working withref
- the reference bases (over the same interval as the haplotypes)refLoc
- the span of the reference basesactiveAllelesToGenotype
- alleles we want to ensure are scheduled for genotyping (GGA mode)maxMnpDistance
- Phased substitutions separated by this distance or less are merged into MNPs. More than
two substitutions occurring in the same alignment block (ie the same M/X/EQ CIGAR element)
are merged until a substitution is separated from the previous one by a greater distance.
That is, if maxMnpDistance = 1, substitutions at positions 10,11,12,14,15,17 are partitioned into a MNP
at 10-12, a MNP at 14-15, and a SNP at 17.null
but perhaps an empty list if there is no variants to report.protected static java.util.List<htsjdk.variant.variantcontext.VariantContext> getVCsAtThisLocation(java.util.List<Haplotype> haplotypes, int loc, java.util.List<htsjdk.variant.variantcontext.VariantContext> activeAllelesToGenotype)
protected static java.util.Map<htsjdk.variant.variantcontext.Allele,java.util.List<Haplotype>> createAlleleMapper(java.util.List<htsjdk.variant.variantcontext.VariantContext> eventsAtThisLoc, htsjdk.variant.variantcontext.VariantContext mergedVC, int loc, java.util.List<Haplotype> haplotypes)
protected ReadLikelihoods<htsjdk.variant.variantcontext.Allele> prepareReadAlleleLikelihoodsForAnnotation(ReadLikelihoods<Haplotype> readHaplotypeLikelihoods, java.util.Map<java.lang.String,java.util.List<GATKRead>> perSampleFilteredReadList, boolean emitReferenceConfidence, java.util.Map<htsjdk.variant.variantcontext.Allele,java.util.List<Haplotype>> alleleMapper, ReadLikelihoods<htsjdk.variant.variantcontext.Allele> readAlleleLikelihoodsForGenotyping, htsjdk.variant.variantcontext.VariantContext call)
protected static java.util.List<htsjdk.variant.variantcontext.VariantContext> phaseCalls(java.util.List<htsjdk.variant.variantcontext.VariantContext> calls, java.util.Set<Haplotype> calledHaplotypes)
calls
- the list of called allelescalledHaplotypes
- the set of haplotypes used for callingprotected static java.util.Map<htsjdk.variant.variantcontext.VariantContext,java.util.Set<Haplotype>> constructHaplotypeMapping(java.util.List<htsjdk.variant.variantcontext.VariantContext> originalCalls, java.util.Set<Haplotype> calledHaplotypes)
originalCalls
- the original unphased callscalledHaplotypes
- the set of haplotypes used for callingprotected static int constructPhaseSetMapping(java.util.List<htsjdk.variant.variantcontext.VariantContext> originalCalls, java.util.Map<htsjdk.variant.variantcontext.VariantContext,java.util.Set<Haplotype>> haplotypeMap, int totalAvailableHaplotypes, java.util.Map<htsjdk.variant.variantcontext.VariantContext,org.apache.commons.lang3.tuple.Pair<java.lang.Integer,java.lang.String>> phaseSetMapping)
originalCalls
- the original unphased callshaplotypeMap
- mapping from alternate allele to the set of haplotypes that contain that alleletotalAvailableHaplotypes
- the total number of possible haplotypes used in callingphaseSetMapping
- the map to populate in this method;
note that it is okay for this method NOT to populate the phaseSetMapping at all (e.g. in an impossible-to-phase situation)protected static java.util.List<htsjdk.variant.variantcontext.VariantContext> constructPhaseGroups(java.util.List<htsjdk.variant.variantcontext.VariantContext> originalCalls, java.util.Map<htsjdk.variant.variantcontext.VariantContext,org.apache.commons.lang3.tuple.Pair<java.lang.Integer,java.lang.String>> phaseSetMapping, int indexTo)
originalCalls
- the original unphased callsphaseSetMapping
- mapping from call (variant context) to phase group IDindexTo
- last index (exclusive) of phase group IDs