hapsburg.PackagesSupport.roh_expectations ========================================= .. py:module:: hapsburg.PackagesSupport.roh_expectations Classes ------- .. autoapisummary:: hapsburg.PackagesSupport.roh_expectations.Expected_Roh Module Contents --------------- .. py:class:: Expected_Roh Class that calculates expected ROH .. py:attribute:: chr_lgts :value: [2.8426, 2.688187, 2.232549, 2.14201, 2.040477, 1.917145, 1.871491, 1.680018, 1.661367,... .. py:method:: roh_pdf_rel(x, chr_l, m) Gives back the pdfs for Blocks of Length l [Morgan] on a Chromosome of Length [Morgan]. m: Nr of Meiosis. Return PDF (per Morgan) .. py:method:: roh_pdf_allchr_rel(x, chr_lgts, m) Calculate the PDF of ROH blocks of length x [Morgan] for m Recombination events summed over Chromosome Lengths x: Can be Array chr_lgts: Array of all chromosome lengths [in Morgan] Return PDF (per Morgan) .. py:method:: coal_prob_rel(m, comm_anc=1) Calculate Coalescence Probability. m: Nr of Meiosis comm_anc: How many common ancestors .. py:method:: exp_roh_ind_rel(x, m, comm_anc=1, chr_lgts=[]) Calculates the Expected density of ROH Blocks per Morgan at x M for full Individual x: Array of Block Lenths m: Nr of Meisois comm_anc: Nr of Ancestry Loops .. py:method:: exp_roh_len_in_bin_rel(l=[0, 3], m=6, comm_anc=4, bins=1000) Calculate Epected Block Length for Individual m Meisosis apart and with comm_anc haplotypes in common within interval l [in Morgan]. bins: Number of linearly spaced bins to do. Return Sum [in Morgan] .. py:method:: roh_pdf_N(x, chr_l, N) Gives back the pdfs for Blocks of Length l [Morgan] on a Chromosome of Length [Morgan]. m: Nr of Meiosis. Return PDF (per Morgan) .. py:method:: roh_pdf_allchr_N(x, chr_lgts=[], N=1000) Calculate the PDF of ROH blocks of length x [Morgan] for pop size N summed over Chromosome Lengths x: Can be Array N: effective population size (stands in for 2N) chr_lgts: Array of all chromosome lengths [in Morgan] Return PDF (per Morgan) .. py:method:: exp_roh_len_in_bin_N(l=[0, 3], bins=1000, N=500, chr_lgts=[]) Calculate Epected Block Length for Individual in panmictic population of size N and within interval l [in Morgan]. bins: Number of linearly spaced bins to do. N: Population size of haploids Return Sum [in Morgan] .. py:method:: var_roh_len_in_bin_N(l=[0, 3], bins=1000, N=500, chr_lgts=[]) Calculate Variance of Sum ROH for Individual in panmictic population of size N and within interval l [in Morgan]. bins: Number of linearly spaced bins to do. N: Population size of haploids Return Variance of Sum [in Morgan] .. py:method:: roh_pdf_t_N(x, chr_l, t, N) Calculate the PDF of ROH blocks of length x [Morgan] dx and time t dt x: Can be Array N: Population size (sometimes stands in for 2N) chr_lgts: Array of all chromosome lengths [in Morgan] Return PDF (per Morgan) .. py:method:: roh_pdf_allchr_t_N(x, chr_lgts=[], t=100, N=1000) Calculate the PDF of ROH blocks of length x [Morgan] for pop size N summed over Chromosome Lengths x: Can be Array t: Density with respect to time of origin of ROH chr_lgts: Array of all chromosome lengths [in Morgan] Return PDF (per Morgan)