Package phase
Class EstPhase
- java.lang.Object
-
- phase.EstPhase
-
public final class EstPhase extends java.lang.Object
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
Constructors Constructor Description EstPhase(FixedPhaseData fpd, long seed)
Constructs a newEstPhase
instance from the specified data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FixedPhaseData
fpd()
Returns the input data for phasing that is the same in each iteration.SamplePhase
get(int sample)
Return the estimated phase for the specified sample.XRefGT
phasedHaps()
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.BitArrayRefGTRec[]
toGTRecs()
Returns the current estimated phased genotypes for the target samples.
-
-
-
Constructor Detail
-
EstPhase
public EstPhase(FixedPhaseData fpd, long seed)
Constructs a newEstPhase
instance from the specified data.- Parameters:
fpd
- the input data for phasingseed
- the seed for random number generation- Throws:
java.lang.NullPointerException
- iffpd == null
-
-
Method Detail
-
fpd
public FixedPhaseData 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
public void set(int sample, SamplePhase samplePhase)
Sets the specified phased genotypes for the specified sample.- Parameters:
sample
- the sample indexsamplePhase
- the estimated phased genotypes- Throws:
java.lang.IndexOutOfBoundsException
- ifsample < 0 || sample >= this.fpd().stage1TargGT().nSamples()
java.lang.NullPointerException
- ifsamplePhase == null
-
get
public SamplePhase get(int sample)
Return the estimated phase for the specified sample.- Parameters:
sample
- a sample index- Returns:
- the estimated phase for the specified sample
- Throws:
java.lang.IndexOutOfBoundsException
- ifsample < 0 || sample >= this.fpd().targGT().nSamples()
-
phasedHaps
public XRefGT phasedHaps()
Returns the current estimated phased genotypes for the target samples.- Returns:
- the current estimated phased genotypes for the target samples
-
toGTRecs
public BitArrayRefGTRec[] toGTRecs()
Returns the current estimated phased genotypes for the target samples.- Returns:
- the current estimated phased genotypes for the target samples
-
-