public final class HapPairSampler
extends java.lang.Object
Class HapPairSampler
samples haplotype pairs and
estimates posterior genotype probabilities.
Instances of class HapPairSampler
are not thread-safe.
Constructor and Description |
---|
HapPairSampler(Par par,
RunStats runStats)
Constructs a new
HapPairSampler instance from the specified data. |
Modifier and Type | Method and Description |
---|---|
java.util.List<HapPair> |
initialHaps(CurrentData cd)
Returns a list of sampled haplotype pairs.
|
java.util.List<HapPair> |
sample(CurrentData cd,
java.util.List<HapPair> hapPairs,
boolean useRevDag,
GenotypeValues gv)
Returns a list of sampled haplotype pairs.
|
public HapPairSampler(Par par, RunStats runStats)
HapPairSampler
instance from the specified data.par
- the analysis parametersrunStats
- the object to which run-time statistics will be writtenjava.lang.NullPointerException
- if par == null || runStats == null
public java.util.List<HapPair> initialHaps(CurrentData cd)
cd
- the input data for the current marker windowjava.lang.NullPointerException
- if cd == null
public java.util.List<HapPair> sample(CurrentData cd, java.util.List<HapPair> hapPairs, boolean useRevDag, GenotypeValues gv)
hapPairs
.
The contract for this method is undefined if the specified
hapPairs
and gv
are inconsistent with the input data
contained in the cd
parameter.cd
- the input data for the current marker windowhapPairs
- the haplotype pairs used to build the haplotype
frequency modeluseRevDag
- true
if the order of markers should
be reversed when building the haplotype frequency model, and
false
otherwisegv
- the current scaled genotype probabilities for the target
samples or null
if genotype probabilities are not to be estimatedjava.lang.IllegalArgumentException
- if haps.isEmpty() == true
java.lang.NullPointerException
- if cd == null || hapPairs == null