ancIBD.plot.plot_posterior

Module Contents

Functions

plot_posterior([ax, morgan, post, het, het_m, df_ibd, ...])

Plot Posterior [k,l] array. If morgan given, plot in centimorgan.

plot_hets(ax, het_m, het[, ypos, alpha, ms, het_c, ...])

Plot Heterozygote Markers onto Axis

plot_posterior_panel([post, figsize, c, c_hw, hspace, ...])

Plot Posterior [k,l] array.

get_map([path_h5, ch, col_map])

Get Map position in Morgan

plot_posterior_IBD2([ax, morgan, post, het, het_m, ...])

Plot Posterior [k,l] array. If morgan given, plot in centimorgan.

ancIBD.plot.plot_posterior.plot_posterior(ax=0, morgan=[], post=[], het=[], het_m=[], df_ibd=[], df_truth=[], state=0, figsize=(12, 3), xlim=[], ylim=[-0.08, 1.27], ylabel='Posterior', xlabel='Position', c='maroon', het_c='gray', c_truth='green', ms=1, lw=3, lw_ibd=10, c_ibd='slateblue', y_ibd=1.2, dpi=400, fs_l=12, show=True, min_cm=4, title='', savepath='')

Plot Posterior [k,l] array. If morgan given, plot in centimorgan. Can then also plot hapROH formatted IBD blocks (df_ibd). And plot ground truth hapROH formatted IBD blocks (df_truth). If het is given [array boolean], plot het using het_m coordinates

ancIBD.plot.plot_posterior.plot_hets(ax, het_m, het, ypos=1.1, alpha=0.3, ms=1, het_c='slateblue', ylabel='Opp. Homozygotes (no/yes)', fs_l=12, ylim=[])

Plot Heterozygote Markers onto Axis

ancIBD.plot.plot_posterior.plot_posterior_panel(post=[], figsize=(12, 9), c='maroon', c_hw='g', hspace=0.12, wspace=0.15, xlim=[], ylim=[-0.05, 1.05], lw=3, fs_l=12, ch=0, savepath='')

Plot Posterior [k,l] array. ch: If bigger 0, load 1240K map postion

ancIBD.plot.plot_posterior.get_map(path_h5='./data/hdf5/1240k_v43/ch', ch=3, col_map='variants/MAP')

Get Map position in Morgan

ancIBD.plot.plot_posterior.plot_posterior_IBD2(ax=0, morgan=[], post=[], het=[], het_m=[], idengt=[], idengt_m=[], df_ibd=[], df_truth=[], state=0, figsize=(12, 3), xlim=[], ylim=[-0.08, 1.37], ylabel='Posterior', xlabel='Position', c='maroon', het_c='gray', c_truth='green', ms=1, lw=0.5, lw_ibd=10, c_ibd='slateblue', y_ibd=1.3, dpi=400, fs_l=12, show=True, min_cm1=4, min_cm2=2, title='', savepath='')

Plot Posterior [k,l] array. If morgan given, plot in centimorgan. Can then also plot hapROH formatted IBD blocks (df_ibd). And plot ground truth hapROH formatted IBD blocks (df_truth). If het is given [array boolean], plot het using het_m coordinates