Package | Description |
---|---|
htsjdk.variant.variantcontext | |
htsjdk.variant.variantcontext.writer |
Modifier and Type | Class and Description |
---|---|
class |
FastGenotype
This class encompasses all the basic information about a genotype.
|
Modifier and Type | Field and Description |
---|---|
protected java.util.ArrayList<Genotype> |
GenotypesContext.notToBeDirectlyAccessedGenotypes
An ArrayList of genotypes contained in this context
WARNING: TO ENABLE THE LAZY VERSION OF THIS CLASS, NO METHODS SHOULD DIRECTLY
ACCESS THIS VARIABLE.
|
Modifier and Type | Method and Description |
---|---|
static Genotype |
GenotypeBuilder.create(java.lang.String sampleName,
java.util.List<Allele> alleles) |
protected static Genotype |
GenotypeBuilder.create(java.lang.String sampleName,
java.util.List<Allele> alleles,
double[] gls) |
static Genotype |
GenotypeBuilder.create(java.lang.String sampleName,
java.util.List<Allele> alleles,
java.util.Map<java.lang.String,java.lang.Object> attributes) |
static Genotype |
GenotypeBuilder.createMissing(java.lang.String sampleName,
int ploidy)
Create a new Genotype object for a sample that's missing from the VC (i.e., in
the output header).
|
Genotype |
GenotypesContext.get(int i) |
Genotype |
GenotypesContext.get(java.lang.String sampleName)
Gets sample associated with this sampleName, or null if none is found
|
Genotype |
VariantContext.getGenotype(int ith) |
Genotype |
VariantContext.getGenotype(java.lang.String sample) |
Genotype |
GenotypeBuilder.make()
Create a new Genotype object using the values set in this builder.
|
Genotype |
GenotypesContext.remove(int i)
Note that remove requires us to invalidate our sample -> index
cache.
|
Genotype |
GenotypesContext.replace(Genotype genotype)
Replaces the genotype in this context -- note for efficiency
reasons we do not add the genotype if it's not present.
|
Genotype |
GenotypesContext.set(int i,
Genotype genotype) |
Modifier and Type | Method and Description |
---|---|
protected java.util.ArrayList<Genotype> |
LazyGenotypesContext.getGenotypes()
Overrides the genotypes accessor.
|
protected java.util.ArrayList<Genotype> |
GenotypesContext.getGenotypes() |
java.lang.Iterable<Genotype> |
VariantContext.getGenotypesOrderedBy(java.lang.Iterable<java.lang.String> sampleOrdering) |
java.lang.Iterable<Genotype> |
VariantContext.getGenotypesOrderedByName() |
java.lang.Iterable<Genotype> |
GenotypesContext.iterateInSampleNameOrder()
Iterate over the Genotypes in this context in their sample name order (A, B, C)
regardless of the underlying order in the vector of genotypes
|
java.lang.Iterable<Genotype> |
GenotypesContext.iterateInSampleNameOrder(java.lang.Iterable<java.lang.String> sampleNamesInOrder)
Iterate over the Genotypes in this context in the order specified by sampleNamesInOrder
|
java.util.Iterator<Genotype> |
GenotypesContext.iterator() |
java.util.ListIterator<Genotype> |
GenotypesContext.listIterator() |
java.util.ListIterator<Genotype> |
GenotypesContext.listIterator(int i) |
java.util.List<Genotype> |
GenotypesContext.subList(int i,
int i1) |
Modifier and Type | Method and Description |
---|---|
boolean |
GenotypesContext.add(Genotype genotype)
Adds a single genotype to this context.
|
void |
GenotypesContext.add(int i,
Genotype genotype) |
int |
Genotype.compareTo(Genotype genotype)
comparable genotypes -> compareTo on the sample names
|
GenotypeBuilder |
GenotypeBuilder.copy(Genotype g)
Copy all of the values for this builder from Genotype g
|
static GenotypesContext |
GenotypesContext.create(Genotype... genotypes)
Create a fully resolved GenotypeContext containing genotypes
|
VariantContextBuilder |
VariantContextBuilder.genotypes(Genotype... genotypes)
Tells this builder that the resulting
VariantContext should use a GenotypeContext containing genotypes |
double |
GenotypeLikelihoods.getLog10GQ(Genotype genotype,
java.util.List<Allele> vcAlleles) |
double |
GenotypeLikelihoods.getLog10GQ(Genotype genotype,
VariantContext context) |
static java.util.Map<VariantContextUtils.JexlVCMatchExp,java.lang.Boolean> |
VariantContextUtils.match(VariantContext vc,
Genotype g,
java.util.Collection<VariantContextUtils.JexlVCMatchExp> exps)
Matches each JexlVCMatchExp exp against the data contained in vc/g, and returns a map from these
expressions to true (if they matched) or false (if they didn't).
|
static boolean |
VariantContextUtils.match(VariantContext vc,
Genotype g,
VariantContextUtils.JexlVCMatchExp exp)
Returns true if exp match VC/g.
|
Genotype |
GenotypesContext.replace(Genotype genotype)
Replaces the genotype in this context -- note for efficiency
reasons we do not add the genotype if it's not present.
|
boolean |
Genotype.sameGenotype(Genotype other) |
boolean |
Genotype.sameGenotype(Genotype other,
boolean ignorePhase) |
Genotype |
GenotypesContext.set(int i,
Genotype genotype) |
Modifier and Type | Method and Description |
---|---|
boolean |
GenotypesContext.addAll(java.util.Collection<? extends Genotype> genotypes)
Adds all of the genotypes to this context
See
GenotypesContext.add(Genotype) for important information about this functions
constraints and performance costs |
boolean |
GenotypesContext.addAll(int i,
java.util.Collection<? extends Genotype> genotypes) |
static GenotypesContext |
GenotypesContext.copy(java.util.Collection<Genotype> toCopy)
Create a GenotypesContext containing the genotypes in iteration order contained
in toCopy
|
static GenotypesContext |
GenotypesContext.create(java.util.ArrayList<Genotype> genotypes)
Create a fully resolved GenotypeContext containing genotypes
|
static GenotypesContext |
GenotypesContext.create(java.util.ArrayList<Genotype> genotypes,
java.util.Map<java.lang.String,java.lang.Integer> sampleNameToOffset,
java.util.List<java.lang.String> sampleNamesInOrder)
Create a fully resolved GenotypeContext containing genotypes, sample lookup table,
and sorted sample names
|
static java.util.Set<java.lang.String> |
VariantContextUtils.genotypeNames(java.util.Collection<Genotype> genotypes) |
VariantContextBuilder |
VariantContextBuilder.genotypes(java.util.Collection<Genotype> genotypes)
Tells this builder that the resulting
VariantContext should use a GenotypeContext containing genotypes
Note that genotypes can be null , meaning there are no genotypes |
Constructor and Description |
---|
GenotypeBuilder(Genotype g)
Create a new builder starting with the values in Genotype g
|
Constructor and Description |
---|
GenotypesContext(java.util.ArrayList<Genotype> genotypes)
Create an GenotypeContext containing genotypes
|
GenotypesContext(java.util.ArrayList<Genotype> genotypes,
java.util.Map<java.lang.String,java.lang.Integer> sampleNameToOffset,
java.util.List<java.lang.String> sampleNamesInOrder)
Create a fully resolved GenotypeContext containing genotypes, sample lookup table,
and sorted sample names
|
LazyData(java.util.ArrayList<Genotype> genotypes,
java.util.List<java.lang.String> sampleNamesInOrder,
java.util.Map<java.lang.String,java.lang.Integer> sampleNameToOffset) |
Modifier and Type | Method and Description |
---|---|
void |
BCF2FieldWriter.GenotypesWriter.addGenotype(BCF2Encoder encoder,
VariantContext vc,
Genotype g) |
void |
BCF2FieldWriter.IGFGenotypesWriter.addGenotype(BCF2Encoder encoder,
VariantContext vc,
Genotype g) |
void |
BCF2FieldWriter.FTGenotypesWriter.addGenotype(BCF2Encoder encoder,
VariantContext vc,
Genotype g) |
void |
BCF2FieldWriter.GTWriter.addGenotype(BCF2Encoder encoder,
VariantContext vc,
Genotype g) |
int |
IntGenotypeFieldAccessors.Accessor.getSize(Genotype g) |
int |
IntGenotypeFieldAccessors.GQAccessor.getValue(Genotype g) |
int |
IntGenotypeFieldAccessors.DPAccessor.getValue(Genotype g) |
abstract int[] |
IntGenotypeFieldAccessors.Accessor.getValues(Genotype g) |
int[] |
IntGenotypeFieldAccessors.ADAccessor.getValues(Genotype g) |
int[] |
IntGenotypeFieldAccessors.PLAccessor.getValues(Genotype g) |
protected int |
BCF2FieldWriter.GenotypesWriter.numElements(VariantContext vc,
Genotype g) |
protected int |
BCF2FieldWriter.IGFGenotypesWriter.numElements(VariantContext vc,
Genotype g) |
protected int |
BCF2FieldWriter.FTGenotypesWriter.numElements(VariantContext vc,
Genotype g) |