Package org.snpeff.stats
Class TsTvStats
java.lang.Object
org.snpeff.stats.TsTvStats
- All Implemented Interfaces:
SamplingStats<VcfEntry>
Calculate Ts/Tv rations per sample (transitions vs transversions)
- Author:
- pablocingolani
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlong
long
double
Transitions / transverions ratio WARNING: I removed the '2.0' factor because it mostly confused people.boolean
hasData()
Does this stat have any databoolean
isTransition
(String ref, String alt) Is this a transition?boolean
isTranversion
(String ref, String alt) Is this a transversion?void
Update Ts and Tv counters Only for SNPstoString()
Show results to stdout
-
Constructor Details
-
TsTvStats
public TsTvStats()
-
-
Method Details
-
getTransitions
public long getTransitions() -
getTransversions
public long getTransversions() -
getTsTvRatio
public double getTsTvRatio()Transitions / transverions ratio WARNING: I removed the '2.0' factor because it mostly confused people. I clarify that the ratio is a 'raw' ratio in the summary page ------------------------------------------------------------------------ Comments that follow are out-dated. I leave it here just for reference. Note: Why is there a '2' in the ratio and not just "number of transitions / number of transverions"? From Casey Bergman (Manchester Univ.) Ts:Tv ratio is a ratio of rates, not observed events. Imagine observing 100 sites with transitions and 100 sites with transversions. Your method would say that the Ts:Tv rate ratio is 1. But since there are 4 possible Tv mutation types and only 2 possible Ts mutation types, in this example there is actually a 2-fold higher rate of Ts mutations that Tv mutations per site. Thus, the Ts:Tv (rate) ratio is 2:1 References: http://www.mun.ca/biology/scarr/Transitions_vs_Transversions.html http://biostar.stackexchange.com/questions/4759/ti-tv-ratio-confirms-snp-discovery-is-this-a-general-rule/- Returns:
-
hasData
public boolean hasData()Does this stat have any data- Specified by:
hasData
in interfaceSamplingStats<VcfEntry>
- Returns:
-
isTransition
Is this a transition?- Parameters:
ref
- : Reference base (upper case)alt
- : Alternative base (upper case)- Returns:
-
isTranversion
Is this a transversion?- Parameters:
ref
- : Reference base (upper case)alt
- : Alternative base (upper case)- Returns:
-
sample
Update Ts and Tv counters Only for SNPs- Specified by:
sample
in interfaceSamplingStats<VcfEntry>
- Parameters:
vcfEntry
-
-
toString
Show results to stdout
-