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
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 static int[]
alleleCounts(GTRec rec)
Returns the allele counts.static double[]
alleleFreq(GTRec rec)
Returns the allele frequencies.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, size
-
Methods inherited from interface vcf.MarkerContainer
marker
-
-
-
-
Method Detail
-
samples
Samples samples()
Returns the list of samples.- Returns:
- the list of samples
-
alleleFreq
static double[] alleleFreq(GTRec rec)
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
static int[] alleleCounts(GTRec rec)
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
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
-
-