| Constructor and Description |
|---|
BitHapPair(Markers markers,
Samples samples,
int sampleIndex,
int[] alleles1,
int[] alleles2)
Constructs a new
BitHapPair instance. |
| 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.
|
java.lang.String |
toString()
Returns a string representation of
this. |
public BitHapPair(Markers markers, Samples samples, int sampleIndex, int[] alleles1, int[] alleles2)
BitHapPair instance.markers - the sequence of markerssamples - the list of samplessampleIndex - the sample indexalleles1 - the sequence of allele indices for the first haplotypealleles2 - the sequence of alleles indices for the second haplotypejava.lang.IllegalArgumentException - if
alleles1.length != markers.nMarkers()
|| alleles2.length != markers.nMarkers()java.lang.IllegalArgumentException - if alleles1[k] < 0 ||
allele1[k] >= markers.marker(k).nAlleles() for some k satisfying
0 <= k && k < markers.nMarkers()java.lang.IllegalArgumentException - if alleles2[k] < 0 ||
allele2[k] >= markers.marker(k).nAlleles() for some k satisfying
0 <= k && k < markers.nMarkers()java.lang.IndexOutOfBoundsException - if
sampleIndex < 0 || sampleIndex >= samples.nSamples()java.lang.NullPointerException - if
marker == null || samples == null || alleles1 == null
|| allele2 == nullpublic int allele1(int marker)
HapPairpublic int allele2(int marker)
HapPairpublic Marker marker(int marker)
HapPairpublic int nMarkers()
HapPairpublic Samples samples()
HapPairpublic int sampleIndex()
HapPairthis.samples().sampleIndex in interface HapPairthis.samples()public java.lang.String toString()
this. The
exact details of the representation are unspecified and subject
to change.toString in class java.lang.Objectthis