Class GenotypeVector

java.lang.Object
org.snpeff.genotypes.GenotypeVector
All Implemented Interfaces:
Serializable

public class GenotypeVector extends Object implements Serializable
A vector of genotypes in a 'compact' structure Note: Genotypes 0/0, 0/1, 1/0, 1/1 are stored in 2 bits. WARNIGN: Other genotypes are ignored or silently converted to 0/0
Author:
pcingola
See Also:
  • Field Details

    • mask

      public static final byte[] mask
    • reverseMask

      public static final byte[] reverseMask
  • Constructor Details

    • GenotypeVector

      public GenotypeVector(int size)
  • Method Details

    • get

      public int get(int sampleNum)
    • set

      public void set(int sampleNum, int code)
      Set genotype code Codes {0, 1, 2, 3} => Genotypes { 0/0, 0/1, 1/0, 1/1 }
      Parameters:
      sampleNum -
      code -
    • set

      public void set(int sampleNum, VcfGenotype vg)
      Set genotype
      Parameters:
      sampleNum -
      vg -
    • size

      public int size()