Class VariantTypeCounter

java.lang.Object
org.snpsift.annotate.mem.variantTypeCounter.VariantTypeCounter
All Implemented Interfaces:
Serializable

public class VariantTypeCounter extends Object implements Serializable
Count different types of variants These statistics are used to create data sets
See Also:
  • Field Details

    • REF

      public static final String REF
      See Also:
    • ALT

      public static final String ALT
      See Also:
    • fields

      protected Fields fields
    • fieldsString

      protected String[] fieldsString
    • countByCategory

      protected int[] countByCategory
    • countVcfEntries

      protected long countVcfEntries
    • countVariants

      protected long countVariants
    • sizesByField

      protected Map<String,int[]> sizesByField
  • Constructor Details

    • VariantTypeCounter

      public VariantTypeCounter(Fields fields)
  • Method Details

    • countVariants

      public static VariantTypeCounter countVariants(String vcfLines)
      Count variants in a string of VCF lines (i.e. a VCF file contents in a string) This is used for testing
    • count

      public void count(org.snpeff.vcf.VcfEntry vcfEntry)
      Count the number of variants in a VCF file
    • getCount

      public int getCount(VariantCategory variantCategory)
    • getCountByCategory

      public int[] getCountByCategory()
    • getFields

      public Fields getFields()
    • getSize

      public int getSize(VariantCategory variantCategory, String field)
      Get total size (in bytes) of a field (only string fields)
      Returns:
      Total size (in bytes) or -1 if the field is not found
    • getSizesByField

      public Map<String,int[]> getSizesByField()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • updateSizes

      protected void updateSizes(VariantCategory variantCategory, String field, String value)
      Update sizes for a field