Package org.snpeff.stats
Class VariantStats
- java.lang.Object
-
- org.snpeff.stats.VariantStats
-
- All Implemented Interfaces:
SamplingStats<Variant>
public class VariantStats extends java.lang.Object implements SamplingStats<Variant>
Variants statistics
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCHANGE_SEPARATOR
-
Constructor Summary
Constructors Constructor Description VariantStats(Genome genome)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description char[]getBases()java.lang.StringgetBasesChangesColor(java.lang.String oldBase, java.lang.String newBase)Background color used for base change tablelonggetBasesChangesCount(java.lang.String oldBase, java.lang.String newBase)Variant.VariantType[]getChangeType()intgetChangeTypeLength()intgetChromosomeLength(java.lang.String chromoName)Choromosome lengthjava.util.List<java.lang.String>getChromosomeNamesEffective()A list of chromosomes that had at least one change Note: Chromosome names are sorted.ChrPosStatsgetChrPosStats(java.lang.String chrName)java.lang.StringgetChrPosStatsChartUrl(java.lang.String chrName)longgetCount()Total number of variantsCountByTypegetCountByChangeType()Number of variants by typeintgetCountByChromosome(java.lang.String chromoName)Number of changes by chromosomelonggetCountNonEmptyId()longgetCountNonVariants()longgetGenomeLen()Genome lengthlonggetGenomeLenEffective()Genome effective length: The sum of length of every chromosome that had a change (e.g.IntStatsgetIndelLen()java.lang.StringgetIndelLenHistoUrl()doublegetKnownRatio()Ratio of known variants (the one with a non-empty ID) and total variantslonggetRateOfChange()Rate of changeintgetRateOfChangeByChromosome(java.lang.String chromoName)Rate of change by chromosomebooleanhasData()Does this statistic have any data?voidsample(Variant variant)Use this sample to perform statistics
-
-
-
Field Detail
-
CHANGE_SEPARATOR
public static final java.lang.String CHANGE_SEPARATOR
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
VariantStats
public VariantStats(Genome genome)
-
-
Method Detail
-
getBases
public char[] getBases()
-
getBasesChangesColor
public java.lang.String getBasesChangesColor(java.lang.String oldBase, java.lang.String newBase)Background color used for base change table
-
getBasesChangesCount
public long getBasesChangesCount(java.lang.String oldBase, java.lang.String newBase)
-
getChangeType
public Variant.VariantType[] getChangeType()
-
getChangeTypeLength
public int getChangeTypeLength()
-
getChromosomeLength
public int getChromosomeLength(java.lang.String chromoName)
Choromosome length- Parameters:
chromoName-- Returns:
-
getChromosomeNamesEffective
public java.util.List<java.lang.String> getChromosomeNamesEffective()
A list of chromosomes that had at least one change Note: Chromosome names are sorted.- Returns:
-
getChrPosStats
public ChrPosStats getChrPosStats(java.lang.String chrName)
-
getChrPosStatsChartUrl
public java.lang.String getChrPosStatsChartUrl(java.lang.String chrName)
-
getCount
public long getCount()
Total number of variants- Returns:
-
getCountByChangeType
public CountByType getCountByChangeType()
Number of variants by type- Returns:
-
getCountByChromosome
public int getCountByChromosome(java.lang.String chromoName)
Number of changes by chromosome- Parameters:
chromoName-- Returns:
-
getCountNonEmptyId
public long getCountNonEmptyId()
-
getCountNonVariants
public long getCountNonVariants()
-
getGenomeLen
public long getGenomeLen()
Genome length- Returns:
-
getGenomeLenEffective
public long getGenomeLenEffective()
Genome effective length: The sum of length of every chromosome that had a change (e.g. If there was no SNP in chromosome Y, then it doesn't count in the effective length)- Returns:
-
getIndelLen
public IntStats getIndelLen()
-
getIndelLenHistoUrl
public java.lang.String getIndelLenHistoUrl()
-
getKnownRatio
public double getKnownRatio()
Ratio of known variants (the one with a non-empty ID) and total variants
-
getRateOfChange
public long getRateOfChange()
Rate of change- Returns:
-
getRateOfChangeByChromosome
public int getRateOfChangeByChromosome(java.lang.String chromoName)
Rate of change by chromosome- Parameters:
chromoName-- Returns:
-
hasData
public boolean hasData()
Description copied from interface:SamplingStatsDoes this statistic have any data?- Specified by:
hasDatain interfaceSamplingStats<Variant>- Returns:
-
sample
public void sample(Variant variant)
Use this sample to perform statistics- Specified by:
samplein interfaceSamplingStats<Variant>
-
-