Package vcf
Interface GTRec
-
- All Superinterfaces:
DuplicatesGTRec,IntArray,MarkerContainer
- All Known Subinterfaces:
RefGTRec
- All Known Implementing Classes:
BitSetGT,LowMafRefDiallelicGT,LowMafRefGT,SeqCodedRefGT,VcfRecord
public interface GTRec extends DuplicatesGTRec
Interface
GTRecrepresents represents genotype data for one marker.All instances of
GTRecare required to be immutable.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description floatgl(int sample, int allele1, int allele2)Returns the probability of the observed data for the specified sample if the specified pair of ordered alleles is the true ordered genotype.booleanisGTData()Returnstrueif the value returned bythis.gl()is determined by a called or missing genotype, and returnsfalseotherwise.Samplessamples()Returns the list of samples.static java.lang.StringtoVcfRec(GTRec gtRec)Returns a VCF record corresponding to the specifiedGTRecobject.-
Methods inherited from interface vcf.DuplicatesGTRec
allele1, allele2, alleles, get, isPhased, isPhased, nSamples, size
-
Methods inherited from interface vcf.MarkerContainer
marker, nAlleles
-
-
-
-
Method Detail
-
samples
Samples samples()
Returns the list of samples.- Returns:
- the list of samples
-
isGTData
boolean isGTData()
Returnstrueif the value returned bythis.gl()is determined by a called or missing genotype, and returnsfalseotherwise.- Returns:
trueif the value returned bythis.gl()is determined by a called or missing genotype
-
gl
float gl(int sample, int allele1, int allele2)Returns the probability of the observed data for the specified sample if the specified pair of ordered alleles is the true ordered genotype.- Parameters:
sample- the sample indexallele1- the first allele indexallele2- the second allele index- Returns:
- the probability of the observed data for the specified sample if the specified pair of ordered alleles is the true ordered genotype.
- Throws:
java.lang.IndexOutOfBoundsException- ifsamples < 0 || samples >= this.nSamples()java.lang.IndexOutOfBoundsException- ifallele1 < 0 || allele1 >= this.marker().nAlleles()java.lang.IndexOutOfBoundsException- ifallele2 < 0 || allele2 >= this.marker().nAlleles()
-
toVcfRec
static java.lang.String toVcfRec(GTRec gtRec)
Returns a VCF record corresponding to the specifiedGTRecobject. 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.- Parameters:
gtRec- the genotype data- Returns:
- a VCF record corresponding to the specified
GTRecobject - Throws:
java.lang.NullPointerException- ifgtRec == null
-
-