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.String
CHANGE_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.String
getBasesChangesColor(java.lang.String oldBase, java.lang.String newBase)
Background color used for base change tablelong
getBasesChangesCount(java.lang.String oldBase, java.lang.String newBase)
Variant.VariantType[]
getChangeType()
int
getChangeTypeLength()
int
getChromosomeLength(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.ChrPosStats
getChrPosStats(java.lang.String chrName)
java.lang.String
getChrPosStatsChartUrl(java.lang.String chrName)
long
getCount()
Total number of variantsCountByType
getCountByChangeType()
Number of variants by typeint
getCountByChromosome(java.lang.String chromoName)
Number of changes by chromosomelong
getCountNonEmptyId()
long
getCountNonVariants()
long
getGenomeLen()
Genome lengthlong
getGenomeLenEffective()
Genome effective length: The sum of length of every chromosome that had a change (e.g.IntStats
getIndelLen()
java.lang.String
getIndelLenHistoUrl()
double
getKnownRatio()
Ratio of known variants (the one with a non-empty ID) and total variantslong
getRateOfChange()
Rate of changeint
getRateOfChangeByChromosome(java.lang.String chromoName)
Rate of change by chromosomeboolean
hasData()
Does this statistic have any data?void
sample(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:SamplingStats
Does this statistic have any data?- Specified by:
hasData
in interfaceSamplingStats<Variant>
- Returns:
-
sample
public void sample(Variant variant)
Use this sample to perform statistics- Specified by:
sample
in interfaceSamplingStats<Variant>
-
-