@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(s).
The following 2x2 contingency table gives the notation for allele support and strand orientation.
+ strand | - strand | |
---|---|---|
REF | X[0][0] | X[0][1] |
ALT | X[1][0] | X[1][1] |
We can then represent the Odds Ratios with the equation:
and its inverse:
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
and
ensures that the annotation value is large only. The final SOR annotation is given in natural log space.
See the method document on statistical tests for a more detailed explanation of this statistical test.
Here is a variant record where SOR is 0.592.
AC=78;AF=2.92135e-02;AN=2670;DP=31492;FS=48.628;MQ=58.02;MQRankSum=-2.02400e+00;MQ_DP=3209;QD=3.03; \ ReadPosRankSum=-1.66500e-01;SB_TABLE=1450,345,160,212;SOR=0.592;VarDP=2167
Read support shows some strand bias for the reference allele but not the alternate allele. The SB_TABLE annotation (a non-GATK annotation) indicates 1450 reference alleles on the forward strand, 345 reference alleles on the reverse strand, 160 alternate alleles on the forward strand and 212 alternate alleles on the reverse strand. The tool uses these counts towards calculating SOR. To avoid multiplying or dividing by zero values, the tool adds one to each count.
refFw = 1450 + 1 = 1451 refRv = 345 + 1 = 346 altFw = 160 + 1 = 161 altRv = 212 + 1 = 213
Calculate SOR with the following.
where
and
Fill out the component equations with the example counts to calculate SOR.
symmetricalRatio = (1451*213)/(161*346) + (161*346)/(1451*213) = 5.7284 refRatio = 346/1451 = 0.2385 altRatio = 161/213 = 0.7559 SOR = ln(5.7284) + ln(0.2385) - ln(0.7559) = 1.7454427755 + (-1.433) - (-0.2798) = 0.592
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(AlleleLikelihoods<GATKRead,htsjdk.variant.variantcontext.Allele> likelihoods,
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, decodeSBBS, getContingencyTable, getContingencyTable, getStrandCounts, 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> calculateAnnotationFromLikelihoods(AlleleLikelihoods<GATKRead,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