Package org.snpeff.genotypes
Class GenotypeVector
java.lang.Object
org.snpeff.genotypes.GenotypeVector
- All Implemented Interfaces:
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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
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 genotypeint
size()
-
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
Set genotype- Parameters:
sampleNum
-vg
-
-
size
public int size()
-