public interface HapPair
Interface HapPair represents a pair of haplotypes for a sample.
The pair of haplotypes are guaranteed to have non-missing alleles at each
marker.
HapPair are required to be immutable.| Modifier and Type | Method and Description |
|---|---|
int |
allele1(int marker)
Returns the first allele for the specified marker.
|
int |
allele2(int marker)
Returns the second allele for the specified marker.
|
Marker |
marker(int marker)
Returns the specified marker.
|
Markers |
markers()
Returns the markers.
|
int |
nMarkers()
Returns the number of markers.
|
int |
sampleIndex()
Returns the index of the sample associated with this haplotype pair
in the list of samples returned by
this.samples(). |
Samples |
samples()
Returns the list of samples containing the sample associated with
this haplotype pair.
|
int allele1(int marker)
marker - a marker indexjava.lang.IndexOutOfBoundsException - if
marker < 0 || marker >= this.nMarkers()int allele2(int marker)
marker - a marker indexjava.lang.IndexOutOfBoundsException - if
marker < 0 || marker >= this.nMarkers()Markers markers()
Marker marker(int marker)
marker - a marker indexjava.lang.IndexOutOfBoundsException - if
marker < 0 || marker >= this.nMarkers()int nMarkers()
Samples samples()
int sampleIndex()
this.samples().this.samples()