public class HaplotypeCoder
extends java.lang.Object
Class HaplotypeCoder
indexes the observed allele sequences
in phased reference and target genotype data in a chromosome interval.
Instances of class HaplotypeCoder
are immutable.
Constructor | Description |
---|---|
HaplotypeCoder(RefGT restrictRefGT,
GT phasedTarg) |
Constructs a new
HaplotypeCoder instance from the specified
data. |
Modifier and Type | Method | Description |
---|---|---|
RefGT |
refHapPairs() |
Returns the phased reference genotypes at the target markers.
|
IndexArray |
run(int start,
int end) |
Returns an array mapping haplotype indices to allele sequence indices
in the specified marker interval.
|
GT |
targHapPairs() |
Returns the phased target genotypes.
|
public HaplotypeCoder(RefGT restrictRefGT, GT phasedTarg)
HaplotypeCoder
instance from the specified
data.restrictRefGT
- the phased reference genotypes at the target
markersphasedTarg
- the phased target genotypesjava.lang.IllegalArgumentException
- if
refHapPairs.markers().equals(targetHapPairs.markers()) == false
java.lang.NullPointerException
- if
refHapPairs == null || targetHapPairs == null
public RefGT refHapPairs()
public GT targHapPairs()
public IndexArray run(int start, int end)
this.refHapPairs.nHaps()
and the last target
haplotype index is
(this.refHapPairs.nHaps() + this.targHapPairs().nHaps() - 1)
.start
- the first marker index (inclusive)end
- the last marker index (exclusive)java.lang.IllegalArgumentException
- if start >= end
java.lang.IndexOutOfBoundsException
- if
start < 0 || end >= this.refHapPairs.nMarkers()