Package vcf
Interface DuplicatesGTRec
-
- All Superinterfaces:
IntArray,MarkerContainer
- All Known Implementing Classes:
BasicGTRec,BitArrayGTRec,BitArrayRefGTRec,LowMafDiallelicGTRec,LowMafGTRec,LowMafRefDiallelicGTRec,LowMafRefGTRec,SeqCodedRefGTRec,VcfRec
public interface DuplicatesGTRec extends MarkerContainer, IntArray
Interface
All instances ofDuplicatesGTRecrepresents marker alleles for a list of samples. The samples in the list of samples are not required to be unique.HapsMarkersare required to be immutable.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intallele1(int sample)Returns the first allele for the specified sample or -1 if the allele is missing.intallele2(int sample)Returns the second allele for the specified sample or -1 if the allele is missing.int[]alleles()Returns an array of lengththis.size()whosej-th element is equal tothis.allele(j}intget(int hap)Returns the specified allele for the specified haplotype or -1 if the allele is missing.booleanisPhased()Returnstrueif every genotype for each sample is a phased, non-missing genotype, and returnsfalseotherwise.booleanisPhased(int sample)Returnstrueif the genotype for the specified sample has non-missing alleles and is either haploid or diploid with a phased allele separator, and returnsfalseotherwise.intsize()Returns the number of haplotypes.-
Methods inherited from interface vcf.MarkerContainer
marker
-
-
-
-
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 ifthis.unphased(marker, sample) == false.- Parameters:
sample- a sample index- Returns:
- the first allele for the specified sample
- Throws:
java.lang.IndexOutOfBoundsException- ifsample < 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 ifthis.unphased(marker, sample) == false.- Parameters:
sample- a sample index- Returns:
- the second allele for the specified sample
- Throws:
java.lang.IndexOutOfBoundsException- ifsample < 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 ifthis.unphased(marker, hap/2) == false.
-
alleles
int[] alleles()
Returns an array of lengththis.size()whosej-th element is equal tothis.allele(j}- Returns:
- an array of length
this.size()whosej-th element is equal tothis.allele(j}
-
size
int size()
Returns the number of haplotypes.
-
isPhased
boolean isPhased(int sample)
Returnstrueif the genotype for the specified sample has non-missing alleles and is either haploid or diploid with a phased allele separator, and returnsfalseotherwise.- Parameters:
sample- a sample index- Returns:
trueif the genotype for the specified sample is a phased, nonmissing genotype- Throws:
java.lang.IndexOutOfBoundsException- ifsample < 0 || sample >= this.size()/2
-
isPhased
boolean isPhased()
Returnstrueif every genotype for each sample is a phased, non-missing genotype, and returnsfalseotherwise.- Returns:
trueif the genotype for each sample is a phased, non-missing genotype
-
-