| Constructor | Description |
|---|---|
HapPairPhasedGT(Samples samples,
java.util.List<BitHapPair> hapPairList) |
Constructs a new
BasicPhasedGT instance from the specified data. |
| Modifier and Type | Method | Description |
|---|---|---|
int |
allele(int marker,
int haplotype) |
Returns the allele on the specified haplotype for the specified marker
or return -1 if the allele is missing.
|
int |
allele1(int marker,
int hapPair) |
Returns the first allele for the specified marker and sample
or return -1 if the allele is missing.
|
int |
allele2(int marker,
int hapPair) |
Returns the second allele for the specified marker and sample
or return -1 if the allele is missing.
|
boolean |
isPhased() |
Returns
true if the genotype for each marker and sample
is a phased, non-missing genotype, and returns false otherwise. |
boolean |
isPhased(int sample) |
Returns
true if the genotype for each marker for the
specified sample is a phased, nonmissing genotype, and returns
false otherwise. |
boolean |
isPhased(int marker,
int sample) |
Returns
true if the genotype for the specified marker
and sample is a phased, nonmissing genotype, and returns false
otherwise. |
Marker |
marker(int marker) |
Returns the specified marker.
|
Markers |
markers() |
Returns the list of markers.
|
int |
nHaps() |
Returns the number of haplotypes.
|
int |
nMarkers() |
Returns the number of markers.
|
int |
nSamples() |
Returns the number of samples.
|
Samples |
samples() |
Returns the list of samples.
|
public HapPairPhasedGT(Samples samples, java.util.List<BitHapPair> hapPairList)
BasicPhasedGT instance from the specified data.samples - a list of sampleshapPairList - a list of haplotype pairs corresponding to the
specified list of samplesjava.lang.IllegalArgumentException - if
hapPairList.isEmpty() == truejava.lang.IllegalArgumentException - if
hapPairList.get(j).markers().equals(hapPairList.get(k).markers())
== false
for any indices j, k satisfying
0 <= j && j < k && k < hapPairList.size()java.lang.IllegalArgumentException - if the list of samples does not
match the list of samples determined by hapPairListjava.lang.IllegalArgumentException - if
samples.nSamples() != hapPairs.size()java.lang.IllegalArgumentException - if
(samples.idIndex(j) != hapPairs.get(j).idIndex()) for any
j satisfying 0 <= j && j < hapPairList.size()java.lang.NullPointerException - if samples == nulljava.lang.NullPointerException - if
(hapPairList == null || hapPairList(j) == null)
for any j satisfying (0 <= j && j < hapPairList.size())public boolean isPhased(int marker,
int sample)
GTtrue if the genotype for the specified marker
and sample is a phased, nonmissing genotype, and returns false
otherwise.public boolean isPhased(int sample)
GTtrue if the genotype for each marker for the
specified sample is a phased, nonmissing genotype, and returns
false otherwise.public boolean isPhased()
GTtrue if the genotype for each marker and sample
is a phased, non-missing genotype, and returns false otherwise.public int allele1(int marker,
int hapPair)
GTthis.unphased(marker, sample) == false.public int allele2(int marker,
int hapPair)
GTthis.unphased(marker, sample) == false.public int allele(int marker,
int haplotype)
GTthis.unphased(marker, hap/2) == false.public int nMarkers()
GTpublic Marker marker(int marker)
GTpublic int nHaps()
GT2*this.nSamples().public int nSamples()
GT