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
GTRec
represents represents genotype data for one marker.All instances of
GTRec
are required to be immutable.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.boolean
isGTData()
Returnstrue
if the value returned bythis.gl()
is determined by a called or missing genotype, and returnsfalse
otherwise.Samples
samples()
Returns the list of samples.static java.lang.String
toVcfRec(GTRec gtRec)
Returns a VCF record corresponding to the specifiedGTRec
object.-
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()
Returnstrue
if the value returned bythis.gl()
is determined by a called or missing genotype, and returnsfalse
otherwise.- Returns:
true
if 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 specifiedGTRec
object. 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
GTRec
object - Throws:
java.lang.NullPointerException
- ifgtRec == null
-
-