Constructor and Description |
---|
RevHapPairs(HapPairs hapPairs)
Creates a new
RevSampleHapPairs instance from the specified data. |
Modifier and Type | Method and Description |
---|---|
int |
allele(int marker,
int haplotype)
Returns the allele for the specified marker and haplotype.
|
int |
allele1(int marker,
int hapPair)
Returns the first allele for the specified marker and haplotype pair.
|
int |
allele2(int marker,
int hapPair)
Returns the second allele for the specified marker and haplotype pair.
|
Marker |
marker(int marker)
Returns the specified marker.
|
Markers |
markers()
Returns the markers.
|
int |
nHapPairs()
Returns the number of haplotype pairs.
|
int |
nHaps()
Returns the number of haplotypes.
|
int |
nMarkers()
Returns the number of markers.
|
int |
sampleIndex(int hapPair)
Returns the index of the sample associated with the specified
haplotype pair in the list of samples returned by
this.samples() . |
Samples |
samples(int hapPair)
Returns a list of samples containing the sample associated with
the specified haplotype pair
|
java.lang.String |
toString()
Returns a string representation of
this . |
public RevHapPairs(HapPairs hapPairs)
RevSampleHapPairs
instance from the specified data.hapPairs
- the haplotype pairs that will be wrapped by the
new instancejava.lang.NullPointerException
- if hapPairs == null
public int allele1(int marker, int hapPair)
HapPairs
public int allele2(int marker, int hapPair)
HapPairs
public int allele(int marker, int haplotype)
HapPairs
public int nMarkers()
HapPairs
public Marker marker(int marker)
HapPairs
public int nHaps()
HapPairs
2*this.nHapPairs()
.public int nHapPairs()
HapPairs
this.nHaps()/2
.public Samples samples(int hapPair)
HapPairs
public int sampleIndex(int hapPair)
HapPairs
this.samples()
.sampleIndex
in interface HapPairs
hapPair
- a haplotype pair indexthis.samples()
public java.lang.String toString()
this
. The exact details
of the representation are unspecified and subject to change.toString
in class java.lang.Object
this