Class FwdPbwtPhaser
- java.lang.Object
-
- phase.FwdPbwtPhaser
-
public class FwdPbwtPhaser extends java.lang.ObjectClass
FwdPbwtPhaserphases input genotype data and imputes missing alleles using the Positional Burrows-Wheeler Transform (PBWT). The PBWT processes markers in order of increasing marker index. If a heterozygote genotypes cannot by phased using the increasing PBWT, an attempt is made to phase the heterozygote using the decreasing PBWT. Similarly, if a missing allele cannot be imputed using the increasing PBWT, an attempt is made to impute the allele using the decreasing PBWT. Any heterozygote genotypes that cannot be phased using the increasing or decreasing PBWT will be randomly phased. Similarly, any alleles that cannot be imputed using the increasing or decreasing PBWT will be randomly imputed using the allele frequencies in the combined reference and target input genotype data.Instances of class
FwdPbwtPhaserare immutable.Reference: Richard Durbin. (2014) Efficient haplotype matching and storage using the Positional Burrows-Wheeler Transform (PBWT). Bioinformatics 30(9):1266-72.
Reference: Olivier Delaneau, Jean-Francois Zagury, Matthew R Robinson, Jonathan Marchini, Emmanouil Dermitzakis. (2019) Accurate, scalable and integrative haplotype estimation. Nature Communications 10(1):5436.
-
-
Constructor Summary
Constructors Constructor Description FwdPbwtPhaser(FixedPhaseData fpd, int start, int end, long seed)Creates a newFwdPbwtPhaserfor the specified data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intallele(int marker, int hap)Returns the specified alleleintend()Return the exclusive end marker index.intstart()Return the inclusive start marker index.GTtargGT()Returns the input target genotypes.
-
-
-
Constructor Detail
-
FwdPbwtPhaser
public FwdPbwtPhaser(FixedPhaseData fpd, int start, int end, long seed)
Creates a newFwdPbwtPhaserfor the specified data.- Parameters:
fpd- the input data for phasingstart- the first marker (inclusive) to be phasedend- the last marker (exclusive) to be phasedseed- seed for random number generation- Throws:
java.lang.IllegalArgumentException- ifstart < 0 || end > targGT.nMarkers() || start >= endjava.lang.NullPointerException- iffpd == null
-
-
Method Detail
-
targGT
public GT targGT()
Returns the input target genotypes.- Returns:
- the input target genotypes
-
start
public int start()
Return the inclusive start marker index.- Returns:
- the inclusive start marker index
-
end
public int end()
Return the exclusive end marker index.- Returns:
- the exclusive end marker index
-
allele
public int allele(int marker, int hap)Returns the specified allele- Parameters:
marker- a marker indexhap- a haplotype index- Returns:
- the specified allele
- Throws:
java.lang.IndexOutOfBoundsException- ifmarker < this.start() || marker >= this.end()java.lang.IndexOutOfBoundsException- ifhap < 0 || hap >= this.targGT().nHaps()
-
-