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.length
java.lang.IllegalArgumentException
- if
refVcfRecs[k].samples().equals(samples) == false
for any
k
satisfying 0 <= k && k < refVcfRecs.length
java.lang.IllegalArgumentException
- if
refVcfRecs[k].marker().equals(markers.marker(k)) == false
for any k
satisfying 0 <= k && k < refVcfRecs.length
java.lang.IllegalArgumentException
- if
refVcfRecs[k].isPhased() == false
for any k
satisfying 0 <= k && k < refVcfRecs.length
java.lang.NullPointerException
- if
markers == null || samples == null || refVcfRecs == null
|| refVcfRecs[k] == null
for any k
satisfying
0 <= k && k <= refVcfRecs.length
public BasicRefGT(RefGTRec[] refVcfRecs)
RefHapPairs
instance.refVcfRecs
- the sequence of per-marker genotype datajava.lang.IllegalArgumentException
- if refVcfRecs.length == 0
java.lang.IllegalArgumentException
- if
refVcfRecs[k].samples().equals(samples) == false
for any
k
satisfying 0 <= k && k < refVcfRecs.length
java.lang.IllegalArgumentException
- if
refVcfRecs[k].isPhased() == false
for any k
satisfying 0 <= k && k < refVcfRecs.length
java.lang.NullPointerException
- if
samples == null || refVcfRecs == null
java.lang.NullPointerException
- if
(refVcfRecs[k] == null)
for any k
satisfying
(0 <= k && k <= refVcfRecs.length)
public boolean isPhased(int marker, int sample)
GT
true
if the genotype for the specified marker
and sample is a phased, nonmissing genotype, and returns false
otherwise.public boolean isPhased(int sample)
GT
true
if the genotype for each marker for the
specified sample is a phased, nonmissing genotype, and returns
false
otherwise.public boolean isPhased()
GT
true
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)
GT
this.unphased(marker, sample) == false
.public int allele2(int marker, int hapPair)
GT
this.unphased(marker, sample) == false
.public int allele(int marker, int haplotype)
GT
this.unphased(marker, hap/2) == false
.public int nMarkers()
GT
public Marker marker(int marker)
GT
public int nHaps()
GT
2*this.nSamples()
.public int nSamples()
GT