Class VariantStats

java.lang.Object
org.snpeff.stats.VariantStats
All Implemented Interfaces:
SamplingStats<Variant>

public class VariantStats extends Object implements SamplingStats<Variant>
Variants statistics
  • Field Details

  • Constructor Details

    • VariantStats

      public VariantStats(Genome genome)
  • Method Details

    • getBases

      public char[] getBases()
    • getBasesChangesColor

      public String getBasesChangesColor(String oldBase, String newBase)
      Background color used for base change table
    • getBasesChangesCount

      public long getBasesChangesCount(String oldBase, String newBase)
    • getChangeType

      public Variant.VariantType[] getChangeType()
    • getChangeTypeLength

      public int getChangeTypeLength()
    • getChromosomeLength

      public int getChromosomeLength(String chromoName)
      Choromosome length
      Parameters:
      chromoName -
      Returns:
    • getChromosomeNamesEffective

      public List<String> getChromosomeNamesEffective()
      A list of chromosomes that had at least one change Note: Chromosome names are sorted.
      Returns:
    • getChrPosStats

      public ChrPosStats getChrPosStats(String chrName)
    • getChrPosStatsChartUrl

      public String getChrPosStatsChartUrl(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(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 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(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 interface SamplingStats<Variant>
      Returns:
    • sample

      public void sample(Variant variant)
      Use this sample to perform statistics
      Specified by:
      sample in interface SamplingStats<Variant>