Package vcf

Interface DuplicatesGTRec

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      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[] alleles()
      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 isPhased()
      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 size()
      Returns the number of haplotypes.
    • Method Detail

      • 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:
        java.lang.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:
        java.lang.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:
        java.lang.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:
        java.lang.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