public final class FastGenotype extends Genotype
isPhased
marker indicating where the alleles are phased with respect to some global
coordinate system. See VCF4.1 spec for a detailed discussionint
s and int[]
values for:
-1
if it's missing-1
if missingVariantContext
. null
if missing.VariantContext
, given
the ploidy of the sample (from the alleles vector). null
if missing.The only way to build a Genotype
object is with a GenotypeBuilder
, which permits values
to be set in any order, which means that GenotypeBuilder
may at some in the chain of
sets pass through invalid states that are not permitted in a fully formed immutable
Genotype
.
Note this is a simplified, refactored Genotype object based on the original generic (and slow) implementation from the original VariantContext + Genotype codebase.
PHASED_ALLELE_SEPARATOR, PRIMARY_KEYS, serialVersionUID, UNPHASED_ALLELE_SEPARATOR
Modifier | Constructor and Description |
---|---|
protected |
FastGenotype(java.lang.String sampleName,
java.util.List<Allele> alleles,
boolean isPhased,
int GQ,
int DP,
int[] AD,
int[] PL,
java.lang.String filters,
java.util.Map<java.lang.String,java.lang.Object> extendedAttributes)
The only way to make one of these, for use by GenotypeBuilder only
|
Modifier and Type | Method and Description |
---|---|
int[] |
getAD() |
Allele |
getAllele(int i)
Get the ith allele in this genotype
|
java.util.List<Allele> |
getAlleles() |
int |
getDP() |
java.util.Map<java.lang.String,java.lang.Object> |
getExtendedAttributes()
Returns the extended attributes for this object
|
int |
getGQ()
Returns a phred-scaled quality score, or -1 if none is available
|
int[] |
getPL()
Unsafe low-level accessor the PL field itself, may be null.
|
boolean |
isPhased()
Are the alleles phased w.r.t.
|
compareTo, countAllele, determineType, getAlleleStrings, getAnyAttribute, getAttributeAsDouble, getAttributeAsInt, getAttributeAsString, getExtendedAttribute, getExtendedAttribute, getFilters, getGenotypeString, getGenotypeString, getLikelihoods, getLikelihoodsString, getLog10PError, getPhredScaledQual, getPloidy, getSampleName, getType, hasAD, hasAnyAttribute, hasDP, hasExtendedAttribute, hasForbiddenKey, hasGQ, hasLikelihoods, hasLog10PError, hasPL, isAvailable, isCalled, isFiltered, isForbiddenKey, isHet, isHetNonRef, isHom, isHomRef, isHomVar, isMixed, isNoCall, isNonInformative, sameGenotype, sameGenotype, sortedString, toBriefString, toString, toStringIfExists, toStringIfExists, toStringIfExists
protected FastGenotype(java.lang.String sampleName, java.util.List<Allele> alleles, boolean isPhased, int GQ, int DP, int[] AD, int[] PL, java.lang.String filters, java.util.Map<java.lang.String,java.lang.Object> extendedAttributes)
sampleName
- alleles
- isPhased
- GQ
- DP
- AD
- PL
- extendedAttributes
- public java.util.List<Allele> getAlleles()
getAlleles
in class Genotype
public Allele getAllele(int i)
Genotype
public boolean isPhased()
Genotype
public int getDP()
public int[] getAD()
public int getGQ()
Genotype
public int[] getPL()
Genotype
public java.util.Map<java.lang.String,java.lang.Object> getExtendedAttributes()
Genotype
getExtendedAttributes
in class Genotype