Package phase
Class PbwtPhaseIbs
- java.lang.Object
-
- phase.PbwtPhaseIbs
-
public final class PbwtPhaseIbs extends java.lang.Object
Class
PbwtPhaseIBS
uses the Positional Burrows-Wheeler Transform (PBWT) to find long IBS haplotypes for each sample that contain a specified small genomic interval.Instances of class
PbwtPhaseIbs
are thread-safe.Reference: Durbin, R. 2014. Bioinformatics 30(9):1266–1272. doi:10.1093/bioinformatics/btu014
-
-
Constructor Summary
Constructors Constructor Description PbwtPhaseIbs(PhaseData phaseData, CodedSteps codedSteps, boolean useBwd)
Constructs a newPbwtPhaseIBS
instance from the specified data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description XRefGT
allHaps()
Returns the estimated phased genotypes for the target and reference samples.int
ibsHap(int hap, int step)
Returns the index of a haplotype that is identical by state with the specified target haplotype in the specified genomic interval, or-1
if there is no identical-by-state haplotype.PhaseData
phaseData()
Returns the current genotype phase estimates and parameter values.
-
-
-
Constructor Detail
-
PbwtPhaseIbs
public PbwtPhaseIbs(PhaseData phaseData, CodedSteps codedSteps, boolean useBwd)
Constructs a newPbwtPhaseIBS
instance from the specified data.- Parameters:
phaseData
- the current genotype phase estimates and parameter valuescodedSteps
- the coded stepsuseBwd
-true
if last-to-first PBWT should be used- Throws:
java.lang.IllegalArgumentException
- ifphaseData.fpd().stage1Steps() != codedSteps.steps()
java.lang.IllegalArgumentException
- ifphaseData.fpd().stage1XRefGT()!=codedSteps.refHaps()
java.lang.IllegalArgumentException
- ifphaseData.fpd().targGT().samples()!=codedSteps.targSamples()
java.lang.NullPointerException
- ifphaseData == null || codedSteps == null
-
-
Method Detail
-
phaseData
public PhaseData phaseData()
Returns the current genotype phase estimates and parameter values.- Returns:
- the current genotype phase estimates and parameter values
-
allHaps
public XRefGT allHaps()
Returns the estimated phased genotypes for the target and reference samples.- Returns:
- the estimated phased genotypes for the target and reference samples
-
ibsHap
public int ibsHap(int hap, int step)
Returns the index of a haplotype that is identical by state with the specified target haplotype in the specified genomic interval, or-1
if there is no identical-by-state haplotype.- Parameters:
hap
- a target haplotype indexstep
- an index of a genomic interval- Returns:
- the index of a haplotype that is identical by state with the specified haplotype int the specified genomic interval
- Throws:
java.lang.IndexOutOfBoundsException
- ifhap < 0 || hap >= this.phaseData().targGT().nHaps()
java.lang.IndexOutOfBoundsException
- ifstep < 0 || step >= this.phaseData().fpd().stage1Steps().size()
-
-