Package org.snpeff.stats
Class VariantStats
java.lang.Object
org.snpeff.stats.VariantStats
- All Implemented Interfaces:
SamplingStats<Variant>
Variants statistics: These are statisticas at Variant level.
For example in a VCF file, there can be more than one variant per VCF entry (i.e. VCF line)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionchar[]
getBases()
getBasesChangesColor
(String oldBase, String newBase) Background color used for base change tablelong
getBasesChangesCount
(String oldBase, String newBase) int
int
getChromosomeLength
(String chromoName) Choromosome lengthA list of chromosomes that had at least one change Note: Chromosome names are sorted.getChrPosStats
(String chrName) getChrPosStatsChartUrl
(String chrName) long
getCount()
Total number of variantsNumber of variants by typeint
getCountByChromosome
(String chromoName) Number of changes by chromosomelong
long
long
Genome lengthlong
Genome effective length: The sum of length of every chromosome that had a change (e.g.double
Ratio of known variants (the one with a non-empty ID) and total variantslong
Rate of changeint
getRateOfChangeByChromosome
(String chromoName) Rate of change by chromosomeboolean
hasData()
Does this statistic have any data?void
Use this sample to perform statistics
-
Field Details
-
CHANGE_SEPARATOR
- See Also:
-
-
Constructor Details
-
VariantStats
-
-
Method Details
-
getBases
public char[] getBases() -
getBasesChangesColor
Background color used for base change table -
getBasesChangesCount
-
getChangeType
-
getChangeTypeLength
public int getChangeTypeLength() -
getChromosomeLength
Choromosome length- Parameters:
chromoName
-- Returns:
-
getChromosomeNamesEffective
A list of chromosomes that had at least one change Note: Chromosome names are sorted.- Returns:
-
getChrPosStats
-
getChrPosStatsChartUrl
-
getCount
public long getCount()Total number of variants- Returns:
-
getCountByChangeType
Number of variants by type- Returns:
-
getCountByChromosome
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
-
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
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
Use this sample to perform statistics- Specified by:
sample
in interfaceSamplingStats<Variant>
- Parameters:
variant
-
-