Package org.snpeff.genotypes
Class GenotypeVector
- java.lang.Object
-
- org.snpeff.genotypes.GenotypeVector
-
- All Implemented Interfaces:
java.io.Serializable
public class GenotypeVector extends java.lang.Object implements java.io.SerializableA 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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static byte[]maskstatic byte[]reverseMask
-
Constructor Summary
Constructors Constructor Description GenotypeVector(int size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intget(int sampleNum)voidset(int sampleNum, int code)Set genotype code Codes {0, 1, 2, 3} => Genotypes { 0/0, 0/1, 1/0, 1/1 }voidset(int sampleNum, VcfGenotype vg)Set genotypeintsize()
-
-
-
Method Detail
-
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()
-
-