public interface VcfEmission extends HapsMarker
Interface VcfEmission represents genotype emission
probabilities for a set of samples at a single marker.
All instances of VcfEmission are required to be immutable.
| Modifier and Type | Method and Description |
|---|---|
int |
allele(int hap)
Returns the allele on the specified haplotype or -1 if the
allele is missing.
|
int |
allele1(int sample)
Returns the first allele for the specified sample or -1 if the
allele is missing.
|
int |
allele2(int sample)
Returns the second allele for the specified sample or -1 if the
allele is missing.
|
int |
alleleCount(int allele)
Returns the number of haplotypes that carry the specified allele.
|
float |
gl(int sample,
int allele1,
int allele2)
Returns the probability of the observed data if the specified pair
of ordered alleles is the true genotype in the specified sample.
|
int |
hapIndex(int allele,
int copy)
Returns index of the haplotype that carries the specified copy of the
specified allele.
|
boolean |
isPhased(int sample)
Returns
true if the genotype emission probabilities for
the specified sample are determined by a phased, nonmissing genotype,
and returns false otherwise. |
boolean |
isRefData()
Returns
true if the genotype emission probabilities
for each sample are determined by a phased called genotype
that has no missing alleles, and returns false otherwise. |
int |
majorAllele()
Returns the index of the major allele.
|
int |
nAlleles()
Returns the number of marker alleles.
|
int |
nSamples()
Returns the number of samples.
|
Samples |
samples()
Returns the list of samples.
|
boolean |
storesNonMajorIndices()
Returns
true if this instance stores the indices of haplotypes
that carry non-major alleles, and returns false otherwise. |
default java.lang.String |
toVcfRec()
Returns a VCF record corresponding to
this. |
marker, nHapPairs, nHapsint nSamples()
Samples samples()
boolean isRefData()
true if the genotype emission probabilities
for each sample are determined by a phased called genotype
that has no missing alleles, and returns false otherwise.true if the genotype emission probabilities
for each sample are determined by a phased called genotype
that has no missing allelesfloat gl(int sample,
int allele1,
int allele2)
sample - the sample indexallele1 - the first allele indexallele2 - the second allele indexjava.lang.IndexOutOfBoundsException - if
samples < 0 || samples >= this.nSamples()java.lang.IndexOutOfBoundsException - if
allele1 < 0 || allele1 >= this.marker().nAlleles()java.lang.IndexOutOfBoundsException - if
allele2 < 0 || allele2 >= this.marker().nAlleles()boolean isPhased(int sample)
true if the genotype emission probabilities for
the specified sample are determined by a phased, nonmissing genotype,
and returns false otherwise.sample - the sample indextrue if the genotype emission probabilities
for the specified sample are determined by a phased, nonmissing genotypejava.lang.IndexOutOfBoundsException - if
sample < 0 || sample >= this.nSamples()int allele1(int sample)
allele1 in interface HapsMarkersample - the sample indexjava.lang.IndexOutOfBoundsException - if
sample < 0 || samples >= this.nSamples()int allele2(int sample)
allele2 in interface HapsMarkersample - the sample indexjava.lang.IndexOutOfBoundsException - if
sample < 0 || samples >= this.nSamples()int allele(int hap)
allele in interface HapsMarkerhap - the haplotype indexjava.lang.IndexOutOfBoundsException - if
hap < 0 || hap >= this.nHaps()int nAlleles()
boolean storesNonMajorIndices()
true if this instance stores the indices of haplotypes
that carry non-major alleles, and returns false otherwise.true if this instance stores the indices of haplotypes
that carry non-major alleles, and returns false otherwiseint majorAllele()
java.lang.UnsupportedOperationException - if
storesNonMajorIndices() == falseint alleleCount(int allele)
allele - an allele indexjava.lang.IllegalArgumentException - if
allele == this.majorAllele()java.lang.IndexOutOfBoundsException - if
allele < 0 || allele >= this.nAlleles()java.lang.UnsupportedOperationException - if
storesNonMajorIndices() == falseint hapIndex(int allele,
int copy)
allele - an allele indexcopy - a copy indexjava.lang.IllegalArgumentException - if
allele == this.majorAllele()java.lang.IndexOutOfBoundsException - if
allele < 0 || allele >= this.nAlleles()java.lang.IndexOutOfBoundsException - if
copy < 0 || copy >= this.alleleCount(allele)java.lang.UnsupportedOperationException - if
storesNonMajorIndices() == falsedefault java.lang.String toVcfRec()
this. The returned
VCF record will have missing QUAL and INFO fields, will have "PASS"
in the filter field, and will have a GT format field.this