hapsburg.func

Functions

fwd_bkwd_p(e_prob0, t_mat, fwd, bwd, r_map)

Takes emission and transition probabilities, and calculates posteriors.

viterbi_path_p(e_prob0, t_mat0, end_p0)

Implementation of a Viterbi Path.

sloppyROH_cumsum(recoMap, target, refHaps[, windowSize])

Figure out per snp agreement between references and reads from target

Module Contents

hapsburg.func.fwd_bkwd_p(e_prob0, t_mat, fwd, bwd, r_map)

Takes emission and transition probabilities, and calculates posteriors. Input: [kxl] matrices of emission, transition and initialized fwd and bwd probabilities. All in log Space

hapsburg.func.viterbi_path_p(e_prob0, t_mat0, end_p0)

Implementation of a Viterbi Path. e_prob0 and t_mat0 [k,l] Matrices with Emission and Transition Probabilities. end_p: probability to begin/end in states [k]

hapsburg.func.sloppyROH_cumsum(recoMap, target, refHaps, windowSize=0.001)

Figure out per snp agreement between references and reads from target Return Max. fraction of reads agreeing with Ref Panel recoMap: Recombination Map [in Morgan] [l] target: Target Readcounts: [2, l] refHaps: Reference Haplotypes: [k, l] windowsize: Extension to each side [in M]