hapsburg.func ============= .. py:module:: hapsburg.func Functions --------- .. autoapisummary:: hapsburg.func.fwd_bkwd_p hapsburg.func.viterbi_path_p hapsburg.func.sloppyROH_cumsum Module Contents --------------- .. py:function:: 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 .. py:function:: 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] .. py:function:: 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]