public interface SingleBaumInterface
Interface SingleBaumInterface has methods for sampling
haplotype pairs.
| Modifier and Type | Method and Description |
|---|---|
Dag |
dag()
Returns the directed acyclic graph that determines the transition
probabilities.
|
GL |
gl()
Returns the emission probabilities.
|
int |
nSamplesPerIndividual()
Returns the number of haplotype pairs that are sampled for each
individual.
|
java.util.List<HapPair> |
randomSample(int sample)
Returns a list of
this.nSamplesPerIndividual() sampled
haplotype pairs for the specified individual. |
java.util.List<HapPair> |
randomSample(int sample,
double[] gtProbs)
Returns a list of
this.nSamplesPerIndividual() sampled
haplotype pairs for the specified individual. |
long |
seed()
Returns the initial random seed.
|
Dag dag()
GL gl()
int nSamplesPerIndividual()
long seed()
java.util.List<HapPair> randomSample(int sample)
Returns a list of this.nSamplesPerIndividual() sampled
haplotype pairs for the specified individual. Haplotype pairs are
sampled conditional on the HMM with transition probabilities
determined by this.dag() and emission probabilities
determined by this.gl().
The contract for this method is unspecified if no haplotype pair is consistent with the HMM.
sample - a sample indexthis.nSamplesPerIndividual() sampled
haplotype pairs for the specified individualjava.lang.IndexOutOfBoundsException - if
sample < 0 || sample >= this.gl().nSamples()java.util.List<HapPair> randomSample(int sample, double[] gtProbs)
Returns a list of this.nSamplesPerIndividual() sampled
haplotype pairs for the specified individual. Haplotype pairs are
sampled conditional on the HMM with transition probabilities determined
by this.dag() and emission probabilities determined by
this.gl(). Posterior genotype probabilities are written to
the specified array. The posterior probability of the j-th
genotype for the k-th marker is stored at index
gl.markers().sumGenotypes(k) + j in the gtProbs array.
The contract for this method is unspecified if no haplotype pair is consistent with the HMM.
sample - the sample indexgtProbs - a array to which posterior genotype probabilities
for the sample will be writtenthis.nSamplesPerIndividual() sampled
haplotype pairs for the specified individualjava.lang.IndexOutOfBoundsException - if
sample < 0 || sample >= this.gl().nSamples()java.lang.IllegalArgumentException - if
gtProbs.length != this.gl().markers().sumGenotypes()java.lang.NullPointerException - if gtProbs == null