public class ConsumeSingleSamples
extends java.lang.Object
implements java.lang.Runnable
Class ConsumeSingleSamples
samples haplotype pairs conditional
on the observed genotype data and a haplotype frequency model.
Class ConsumeSingleSamples
is designed for use as a consumer in a
producer-consumer design pattern.
Instances of class ConsumeSingleSamples
are thread-safe if the
synchronization requirements for the constructor are satisfied.
Modifier and Type | Field and Description |
---|---|
static java.lang.Integer |
POISON
A sentinel
Integer . |
Constructor and Description |
---|
ConsumeSingleSamples(boolean markersAreReversed,
SingleBaumInterface baum,
java.util.concurrent.BlockingQueue<java.lang.Integer> qIn,
java.util.List<HapPair> hapList)
Constructs a new
ConsumeSingleSample instance. |
ConsumeSingleSamples(boolean markersAreReversed,
SingleBaumInterface baum,
java.util.concurrent.BlockingQueue<java.lang.Integer> qIn,
java.util.List<HapPair> hapList,
GenotypeValues gv)
Constructs a new
ConsumeSingleSample instance. |
Modifier and Type | Method and Description |
---|---|
void |
run()
Takes sample indices from the thread-safe work-queue specified at time of
construction and samples haplotype pairs for each sample.
|
public ConsumeSingleSamples(boolean markersAreReversed, SingleBaumInterface baum, java.util.concurrent.BlockingQueue<java.lang.Integer> qIn, java.util.List<HapPair> hapList)
ConsumeSingleSample
instance.markersAreReversed
- true
if the baum
parameter
randomSample()
method produces sampled haplotype pairs that have
their marker order reversed and false
otherwisebaum
- a thread-confined instance of class
sample.SingleBaumInterface
qIn
- a thread-safe input work queuehapList
- a thread-safe list for storing sampled haplotype pairsjava.lang.NullPointerException
- if any parameter is null
public ConsumeSingleSamples(boolean markersAreReversed, SingleBaumInterface baum, java.util.concurrent.BlockingQueue<java.lang.Integer> qIn, java.util.List<HapPair> hapList, GenotypeValues gv)
ConsumeSingleSample
instance.markersAreReversed
- true
if the baum
parameter
randomSample()
method produces sampled haplotype pairs that have
their marker order reversed and false
otherwisebaum
- a thread-confined instance of class
sample.SingleBaumInterface
qIn
- a thread-safe input work queuehapList
- a thread-safe list for storing sampled haplotype pairsgv
- a thread-safe object which stores scaled posterior genotype
probabilitiesjava.lang.NullPointerException
- if any parameter is null