Package vcf

Interface DuplicatesGTRec

All Superinterfaces:
IntArray, MarkerContainer
All Known Subinterfaces:
GTRec, RefGTRec
All Known Implementing Classes:
BasicGTRec, BitArrayGTRec, BitArrayRefGTRec, LowMafDiallelicGTRec, LowMafGTRec, LowMafRefDiallelicGTRec, LowMafRefGTRec, SeqCodedRefGTRec, VcfRec

public interface DuplicatesGTRec extends MarkerContainer, IntArray

Interface DuplicatesGTRec represents marker alleles for a list of samples. The samples in the list of samples are not required to be unique.

All instances of HapsMarkers are required to be immutable.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    allele1(int sample)
    Returns the first allele for the specified sample or -1 if the allele is missing.
    int
    allele2(int sample)
    Returns the second allele for the specified sample or -1 if the allele is missing.
    int[]
    Returns an array of length this.size() whose j-th element is equal to this.allele(j}
    int
    get(int hap)
    Returns the specified allele for the specified haplotype or -1 if the allele is missing.
    boolean
    Returns true if every genotype for each sample is a phased, non-missing genotype, and returns false otherwise.
    boolean
    isPhased(int sample)
    Returns true if the genotype for the specified sample has non-missing alleles and is either haploid or diploid with a phased allele separator, and returns false otherwise.
    int
    Returns the number of haplotypes.

    Methods inherited from interface vcf.MarkerContainer

    marker
  • Method Details

    • allele1

      int allele1(int sample)
      Returns the first allele for the specified sample or -1 if the allele is missing. The two alleles for a sample are arbitrarily ordered if this.unphased(marker, sample) == false.
      Parameters:
      sample - a sample index
      Returns:
      the first allele for the specified sample
      Throws:
      IndexOutOfBoundsException - if sample < 0 || sample >= this.size()/2
    • allele2

      int allele2(int sample)
      Returns the second allele for the specified sample or -1 if the allele is missing. The two alleles for a sample are arbitrarily ordered if this.unphased(marker, sample) == false.
      Parameters:
      sample - a sample index
      Returns:
      the second allele for the specified sample
      Throws:
      IndexOutOfBoundsException - if sample < 0 || sample >= this.size()/2
    • get

      int get(int hap)
      Returns the specified allele for the specified haplotype or -1 if the allele is missing. The two alleles for a sample at a marker are arbitrarily ordered if this.unphased(marker, hap/2) == false.
      Specified by:
      get in interface IntArray
      Parameters:
      hap - a haplotype index
      Returns:
      the specified allele for the specified sample
      Throws:
      IndexOutOfBoundsException - if hap < 0 || hap >= this.size()
    • alleles

      int[] alleles()
      Returns an array of length this.size() whose j-th element is equal to this.allele(j}
      Returns:
      an array of length this.size() whose j-th element is equal to this.allele(j}
    • size

      int size()
      Returns the number of haplotypes.
      Specified by:
      size in interface IntArray
      Returns:
      the number of haplotypes
    • isPhased

      boolean isPhased(int sample)
      Returns true if the genotype for the specified sample has non-missing alleles and is either haploid or diploid with a phased allele separator, and returns false otherwise.
      Parameters:
      sample - a sample index
      Returns:
      true if the genotype for the specified sample is a phased, nonmissing genotype
      Throws:
      IndexOutOfBoundsException - if sample < 0 || sample >= this.size()/2
    • isPhased

      boolean isPhased()
      Returns true if every genotype for each sample is a phased, non-missing genotype, and returns false otherwise.
      Returns:
      true if the genotype for each sample is a phased, non-missing genotype