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 ofDuplicatesGTRec
represents marker alleles for a list of samples. The samples in the list of samples are not required to be unique.HapsMarkers
are required to be immutable.
-
-
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 lengththis.size()
whosej
-th element is equal tothis.allele(j
}int
get(int hap)
Returns the specified allele for the specified haplotype or -1 if the allele is missing.boolean
isPhased()
Returnstrue
if every genotype for each sample is a phased, non-missing genotype, and returnsfalse
otherwise.boolean
isPhased(int sample)
Returnstrue
if the genotype for the specified sample has non-missing alleles and is either haploid or diploid with a phased allele separator, and returnsfalse
otherwise.int
size()
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)
Returnstrue
if the genotype for the specified sample has non-missing alleles and is either haploid or diploid with a phased allele separator, and returnsfalse
otherwise.- Parameters:
sample
- a sample index- Returns:
true
if the genotype for the specified sample is a phased, nonmissing genotype- Throws:
java.lang.IndexOutOfBoundsException
- ifsample < 0 || sample >= this.size()/2
-
isPhased
boolean isPhased()
Returnstrue
if every genotype for each sample is a phased, non-missing genotype, and returnsfalse
otherwise.- Returns:
true
if the genotype for each sample is a phased, non-missing genotype
-
-