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 == null
public int allele1(int marker)
HapPair
public int allele2(int marker)
HapPair
public Marker marker(int marker)
HapPair
public int nMarkers()
HapPair
public Samples samples()
HapPair
public int sampleIndex()
HapPair
this.samples()
.sampleIndex
in interface HapPair
this.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