Package phase
Class PbwtPhaseIbs
java.lang.Object
phase.PbwtPhaseIbs
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
ConstructorsConstructorDescriptionPbwtPhaseIbs
(PhaseData phaseData, CodedSteps codedSteps, boolean useBwd) Constructs a newPbwtPhaseIBS
instance from the specified data. -
Method Summary
Modifier and TypeMethodDescriptionallHaps()
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.Returns the current genotype phase estimates and parameter values.
-
Constructor Details
-
PbwtPhaseIbs
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:
IllegalArgumentException
- ifphaseData.fpd().stage1Steps() != codedSteps.steps()
IllegalArgumentException
- ifphaseData.fpd().stage1XRefGT()!=codedSteps.refHaps()
IllegalArgumentException
- ifphaseData.fpd().targGT().samples()!=codedSteps.targSamples()
NullPointerException
- ifphaseData == null || codedSteps == null
-
-
Method Details
-
phaseData
Returns the current genotype phase estimates and parameter values.- Returns:
- the current genotype phase estimates and parameter values
-
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:
IndexOutOfBoundsException
- ifhap < 0 || hap >= this.phaseData().targGT().nHaps()
IndexOutOfBoundsException
- ifstep < 0 || step >= this.phaseData().fpd().stage1Steps().size()
-