@DocumentedFeature(groupName="Variant Annotations", groupSummary="Available to HaplotypeCaller, Mutect2, VariantAnnotator and GenotypeGVCFs. See https://software.broadinstitute.org/gatk/documentation/article?id=10836", summary="Strand bias estimated by the symmetric odds ratio test (SOR)") public final class StrandOddsRatio extends StrandBiasTest implements StandardAnnotation
Strand bias is a type of sequencing bias in which one DNA strand is favored over the other, which can result in incorrect evaluation of the amount of evidence observed for one allele vs. the other. The StrandOddsRatio annotation is one of several methods that aims to evaluate whether there is strand bias in the data. It is an updated form of the Fisher Strand Test that is better at taking into account large amounts of data in high coverage situations. It is used to determine if there is strand bias between forward and reverse strands for the reference or alternate allele.
Odds Ratios in the 2x2 contingency table below are
$$ R = \frac{X[0][0] * X[1][1]}{X[0][1] * X[1][0]} $$and its inverse:
+ strand | - strand | |
REF; | X[0][0] | X[0][1] |
ALT; | X[1][0] | X[1][1] |
The sum R + 1/R is used to detect a difference in strand bias for REF and for ALT (the sum makes it symmetric). A high value is indicative of large difference where one entry is very small compared to the others. A scale factor of refRatio/altRatio where
$$ refRatio = \frac{max(X[0][0], X[0][1])}{min(X[0][0], X[0][1} $$and
$$ altRatio = \frac{max(X[1][0], X[1][1])}{min(X[1][0], X[1][1]} $$ensures that the annotation value is large only.
See the method document on statistical tests for a more detailed explanation of this statistical test.
ARRAY_DIM, ARRAY_SIZE
Constructor and Description |
---|
StrandOddsRatio() |
Modifier and Type | Method and Description |
---|---|
protected java.util.Map<java.lang.String,java.lang.Object> |
calculateAnnotationFromGTfield(htsjdk.variant.variantcontext.GenotypesContext genotypes) |
protected java.util.Map<java.lang.String,java.lang.Object> |
calculateAnnotationFromLikelihoods(ReadLikelihoods<htsjdk.variant.variantcontext.Allele> likelihoods,
htsjdk.variant.variantcontext.VariantContext vc) |
protected java.util.Map<java.lang.String,java.lang.Object> |
calculateAnnotationFromStratifiedContexts(java.util.Map<java.lang.String,java.util.List<PileupElement>> stratifiedContexts,
htsjdk.variant.variantcontext.VariantContext vc) |
static double |
calculateSOR(int[][] table)
Computes the SOR value of a table after augmentation.
|
static java.lang.String |
formattedValue(double sor) |
java.util.List<java.lang.String> |
getKeyNames()
Return the keys
|
annotate, getContingencyTable, getContingencyTable, getPileupContingencyTable, getTableFromSamples, passesMinimumThreshold
getDescriptions
toString
protected java.util.Map<java.lang.String,java.lang.Object> calculateAnnotationFromGTfield(htsjdk.variant.variantcontext.GenotypesContext genotypes)
calculateAnnotationFromGTfield
in class StrandBiasTest
protected java.util.Map<java.lang.String,java.lang.Object> calculateAnnotationFromStratifiedContexts(java.util.Map<java.lang.String,java.util.List<PileupElement>> stratifiedContexts, htsjdk.variant.variantcontext.VariantContext vc)
calculateAnnotationFromStratifiedContexts
in class StrandBiasTest
protected java.util.Map<java.lang.String,java.lang.Object> calculateAnnotationFromLikelihoods(ReadLikelihoods<htsjdk.variant.variantcontext.Allele> likelihoods, htsjdk.variant.variantcontext.VariantContext vc)
calculateAnnotationFromLikelihoods
in class StrandBiasTest
public static double calculateSOR(int[][] table)
table
- The table before adding pseudocountspublic static java.lang.String formattedValue(double sor)
public java.util.List<java.lang.String> getKeyNames()
VariantAnnotation
getKeyNames
in class VariantAnnotation