public class RefHapSeg
extends java.lang.Object
Class RefHapSeg represents a chromosome segment of
reference haplotypes.
Instances of class RefHapSeg are immutable.
| Constructor and Description |
|---|
RefHapSeg(SampleHapPairs refHapPairs,
int start,
int end)
Constructs a new
RefHapSegs instance from the specified data. |
| Modifier and Type | Method and Description |
|---|---|
int |
allele(int marker,
int seq)
Return the specified reference haplotype allele.
|
int |
end()
Returns the ending marker index (exclusive) of this segment.
|
int |
nSeq()
Return the number of reference allele sequences in this segment.
|
SampleHapPairs |
refHapPairs()
Returns the reference haplotype pairs.
|
int |
seq(int hap)
Return the index of the reference allele sequence in this segment
for the specified reference haplotype.
|
int |
start()
Returns the starting marker index (inclusive) of this segment.
|
public RefHapSeg(SampleHapPairs refHapPairs, int start, int end)
RefHapSegs instance from the specified data.refHapPairs - the reference haplotype pairsstart - the starting marker index (inclusive)end - the ending marker index (exclusive)java.lang.IllegalArgumentException - if
start < 0 || start >= end || end > refHapPairs.nMarkers()java.lang.NullPointerException - if refHapPairs == nullpublic SampleHapPairs refHapPairs()
public int nSeq()
public int seq(int hap)
hap - a haplotype indexjava.lang.IndexOutOfBoundsException - if
hap < 0 || hap >= this.refHapPairs().nHaps()public int allele(int marker,
int seq)
marker - index of a marker in this segmentseq - index of a reference allele sequence in this segmentjava.lang.IndexOutOfBoundsException - if
marker < 0 || marker >= (this.end() - this.start())java.lang.IndexOutOfBoundsException - if
seq < 0 || seg >= this.nSeq(segment)public int start()
public int end()