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 Details

    • samples

      Samples samples()
      Returns the list of samples.
      Returns:
      the list of samples
    • alleleFreq

      static double[] alleleFreq(GTRec rec)
      Returns the allele frequencies. The k-th element of the returned array is the frequency of the k-th allele.
      Parameters:
      rec - the genotype data for a marker
      Returns:
      the allele frequencies
    • alleleCounts

      static int[] alleleCounts(GTRec rec)
      Returns the allele counts. The k-th element of the returned array is the count of the k-th allele.
      Parameters:
      rec - the genotype data for a marker
      Returns:
      the allele frequencies
    • toVcfRec

      static String toVcfRec(GTRec gtRec)
      Returns a VCF record corresponding to the specified GTRec 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:
      NullPointerException - if gtRec == null