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 Summary

    Fields
    Modifier and Type
    Field
    Description
    static final byte[]
     
    static final byte[]
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    GenotypeVector(int size)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    get(int sampleNum)
     
    void
    set(int sampleNum, int code)
    Set genotype code Codes {0, 1, 2, 3} => Genotypes { 0/0, 0/1, 1/0, 1/1 }
    void
    set(int sampleNum, VcfGenotype vg)
    Set genotype
    int
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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()