WrappedHapPairspublic interface HapPairs
Interface HapPairs represents a list of haplotype pairs.
Each haplotype pair is guaranteed to have two non-missing
alleles at each marker.
HapPairs are required to
be immutable.| Modifier and Type | Method | 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.
|
int |
idIndex(int hapPair) |
Returns the sample identifier index for the specified 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 allele(int marker,
int haplotype)
marker - a marker indexhaplotype - a haplotype indexjava.lang.IndexOutOfBoundsException - if
marker < 0 || marker >= this.nMarkers()java.lang.IndexOutOfBoundsException - if
haplotype < 0 || haplotype >= this.nHaps()int allele1(int marker,
int hapPair)
marker - a marker indexhapPair - a haplotype pair indexjava.lang.IndexOutOfBoundsException - if
marker < 0 || marker >= this.nMarkers()java.lang.IndexOutOfBoundsException - if
hapPair < 0 || hapPair >= this.nHapPairs()int allele2(int marker,
int hapPair)
marker - a marker indexhapPair - a haplotype pair indexjava.lang.IndexOutOfBoundsException - if
marker < 0 || marker >= this.nMarkers()java.lang.IndexOutOfBoundsException - if
hapPair < 0 || hapPair >= this.nHapPairs()int nMarkers()
Markers markers()
Marker marker(int marker)
marker - a marker indexjava.lang.IndexOutOfBoundsException - if
marker < 0 || marker >= this.nMarkers()int nHaps()
2*this.nHapPairs().int nHapPairs()
this.nHaps()/2.int idIndex(int hapPair)
hapPair - a haplotype pair indexjava.lang.IndexOutOfBoundsException - if
hapPair < 0 || hapPair >= this.nHapPairs()