| Constructor | Description |
|---|---|
BasicRefGT(Markers markers,
Samples samples,
RefGTRec[] refVcfRecs) |
Constructs a new
RefHapPairs instance. |
BasicRefGT(RefGTRec[] refVcfRecs) |
Constructs a new
RefHapPairs instance. |
| 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.
|
RefGTRec |
get(int marker) |
Returns the
RefGTRec for the specified marker. |
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 BasicRefGT(Markers markers, Samples samples, RefGTRec[] refVcfRecs)
RefHapPairs instance.markers - the sequence of markerssamples - the sequence of samplesrefVcfRecs - the sequence of per-marker genotype datajava.lang.IllegalArgumentException - if
markers.nMarkers() != refVcfRecs.lengthjava.lang.IllegalArgumentException - if
refVcfRecs[k].samples().equals(samples) == false for any
k satisfying 0 <= k && k < refVcfRecs.lengthjava.lang.IllegalArgumentException - if
refVcfRecs[k].marker().equals(markers.marker(k)) == false
for any k satisfying 0 <= k && k < refVcfRecs.lengthjava.lang.IllegalArgumentException - if
refVcfRecs[k].isPhased() == false for any k
satisfying 0 <= k && k < refVcfRecs.lengthjava.lang.NullPointerException - if
markers == null || samples == null || refVcfRecs == null
|| refVcfRecs[k] == null for any k satisfying
0 <= k && k <= refVcfRecs.lengthpublic BasicRefGT(RefGTRec[] refVcfRecs)
RefHapPairs instance.refVcfRecs - the sequence of per-marker genotype datajava.lang.IllegalArgumentException - if refVcfRecs.length == 0java.lang.IllegalArgumentException - if
refVcfRecs[k].samples().equals(samples) == false for any
k satisfying 0 <= k && k < refVcfRecs.lengthjava.lang.IllegalArgumentException - if
refVcfRecs[k].isPhased() == false for any k
satisfying 0 <= k && k < refVcfRecs.lengthjava.lang.NullPointerException - if
samples == null || refVcfRecs == nulljava.lang.NullPointerException - if
(refVcfRecs[k] == null) for any k satisfying
(0 <= k && k <= refVcfRecs.length)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