Package phase
Class CodedSteps
- java.lang.Object
-
- phase.CodedSteps
-
public class CodedSteps extends java.lang.ObjectClass
CodedStepsdivides phased genotype data into non-overlapping intervals (the steps), indexes the unique allele sequences in each interval, and stores a map of haplotype index to allele sequence index for each interval.Instances of class
CodedStepsare immutable.
-
-
Constructor Summary
Constructors Constructor Description CodedSteps(EstPhase estPhase)Constructs a newCodedStepsinstance from the specified data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description XRefGTallHaps()Return the phased target and reference genotype data that was used to construct thisCodedStepsinstance.IndexArrayget(int step)Returns a map from haplotype index to allele sequence index for the specified stepjava.util.Optional<XRefGT>refHaps()Returns the reference haplotypesStepssteps()Returns the partition of the markers into non-overlapping intervals.SamplestargSamples()Returns the target samples.
-
-
-
Constructor Detail
-
CodedSteps
public CodedSteps(EstPhase estPhase)
Constructs a newCodedStepsinstance from the specified data.- Parameters:
estPhase- the input data genotype phasing and the current phase estimate for each target sample- Throws:
java.lang.NullPointerException- ifestPhase == null
-
-
Method Detail
-
get
public IndexArray get(int step)
Returns a map from haplotype index to allele sequence index for the specified step- Parameters:
step- a step index- Returns:
- a map from haplotype index to allele sequence index for the specified step
- Throws:
java.lang.IllegalArgumentException- ifstep < 0 || step >= this.steps().size()
-
targSamples
public Samples targSamples()
Returns the target samples.- Returns:
- the target samples
-
refHaps
public java.util.Optional<XRefGT> refHaps()
Returns the reference haplotypes- Returns:
- the reference haplotypes
-
allHaps
public XRefGT allHaps()
Return the phased target and reference genotype data that was used to construct thisCodedStepsinstance. The target haplotypes precede the reference haplotypes.- Returns:
- the phased target and reference genotype data
-
steps
public Steps steps()
Returns the partition of the markers into non-overlapping intervals.- Returns:
- the partition of the markers into non-overlapping intervals
-
-