Package phase
Class EstPhase
java.lang.Object
phase.EstPhase
Class EstPhase
stores input genotype data and the
current estimated phased genotypes for each target sample.
Instances of class EstPhase
are thread-safe.
-
Constructor Summary
ConstructorsConstructorDescriptionEstPhase
(FixedPhaseData fpd, long seed) Constructs a newEstPhase
instance from the specified data. -
Method Summary
Modifier and TypeMethodDescriptionfpd()
Returns the input data for phasing that is the same in each iteration.get
(int sample) Return the estimated phase for the specified sample.Returns the current estimated phased genotypes for the target samples.void
set
(int sample, SamplePhase samplePhase) Sets the specified phased genotypes for the specified sample.toGTRecs()
Returns the current estimated phased genotypes for the target samples.
-
Constructor Details
-
EstPhase
Constructs a newEstPhase
instance from the specified data.- Parameters:
fpd
- the input data for phasingseed
- the seed for random number generation- Throws:
NullPointerException
- iffpd == null
-
-
Method Details
-
fpd
Returns the input data for phasing that is the same in each iteration.- Returns:
- the input data for phasing that is the same in each iteration
-
set
Sets the specified phased genotypes for the specified sample.- Parameters:
sample
- the sample indexsamplePhase
- the estimated phased genotypes- Throws:
IndexOutOfBoundsException
- ifsample < 0 || sample >= this.fpd().stage1TargGT().nSamples()
NullPointerException
- ifsamplePhase == null
-
get
Return the estimated phase for the specified sample.- Parameters:
sample
- a sample index- Returns:
- the estimated phase for the specified sample
- Throws:
IndexOutOfBoundsException
- ifsample < 0 || sample >= this.fpd().targGT().nSamples()
-
phasedHaps
Returns the current estimated phased genotypes for the target samples.- Returns:
- the current estimated phased genotypes for the target samples
-
toGTRecs
Returns the current estimated phased genotypes for the target samples.- Returns:
- the current estimated phased genotypes for the target samples
-