Package vcf
Interface GTRec
- All Superinterfaces:
DuplicatesGTRec,IntArray,MarkerContainer
- All Known Subinterfaces:
RefGTRec
- All Known Implementing Classes:
BasicGTRec,BitArrayGTRec,BitArrayRefGTRec,LowMafDiallelicGTRec,LowMafGTRec,LowMafRefDiallelicGTRec,LowMafRefGTRec,SeqCodedRefGTRec,VcfRec
Interface GTRec represents represents genotype data for one
marker.
All instances of GTRec are required to be immutable.
-
Method Summary
Modifier and TypeMethodDescriptionstatic int[]alleleCounts(GTRec rec) Returns the allele counts.static double[]alleleFreq(GTRec rec) Returns the allele frequencies.samples()Returns the list of samples.static StringReturns a VCF record corresponding to the specifiedGTRecobject.Methods inherited from interface vcf.DuplicatesGTRec
allele1, allele2, alleles, get, isPhased, isPhased, sizeMethods inherited from interface vcf.MarkerContainer
marker
-
Method Details
-
samples
Samples samples()Returns the list of samples.- Returns:
- the list of samples
-
alleleFreq
Returns the allele frequencies. Thek-th element of the returned array is the frequency of thek-th allele.- Parameters:
rec- the genotype data for a marker- Returns:
- the allele frequencies
-
alleleCounts
Returns the allele counts. Thek-th element of the returned array is the count of thek-th allele.- Parameters:
rec- the genotype data for a marker- Returns:
- the allele frequencies
-
toVcfRec
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:
NullPointerException- ifgtRec == null
-