hapsburg.figures.plot_posterior =============================== .. py:module:: hapsburg.figures.plot_posterior .. autoapi-nested-parse:: Main Inference Class for HMM. Wrapper for Inerence of Posterior. @ Author: Harald Ringbauer, 2019, All rights reserved Functions --------- .. autoapisummary:: hapsburg.figures.plot_posterior.load_data hapsburg.figures.plot_posterior.process_read_counts hapsburg.figures.plot_posterior.plot_posterior_cm hapsburg.figures.plot_posterior.plot_viterbi hapsburg.figures.plot_posterior.plot_posterior Module Contents --------------- .. py:function:: load_data(folder='../Simulated/Example0/', empirical=False, fullpost=False, viterbi=False, readcounts=True) Load and return the Data from one Data Folder .. py:function:: process_read_counts(read_counts, m=1) Return Readcount that have at least m reads for both Ref and Alt .. py:function:: plot_posterior_cm(folder='../Simulated/Test20r/', savepath='', empirical=True, plot=True, cm_lim=[], ylim=[-0.1, 1.25], m=1, groundtruth=False, readcount=False, plot_hets=True, plot_calls=True, plot_post=True, scale=1.0, min_cm=1.0, yticks=[0.0, 0.2, 0.4, 0.6, 0.8, 1.0], xlabel='Map position [centimorgan]', figsize=(14, 4), title='', post_c='maroon', het_c='blue') Plot Viterbi Path of Haplotype copying. save: Whether to save the results. empirical: If true, do not load and plot latent states cm_lim: What Area to Zoom In (CentiMorgan) m: How many reads for ref and alt yticks: Where to place the Y ticks groundtruth: Whether to plot Ground Truth (saved as csv). Only used in simulated data with known ROH plot_hets: Whether to plot Heterozygote Markers plot_calls: Whether to plot Calls plot_post: Whether to plot posterior plot: Whether to show the plot in python .. py:function:: plot_viterbi(folder='../Simulated/Test20r/', save=True, empirical=False) Plot Viterbi Path of Haplotype copying .. py:function:: plot_posterior(folder='../Simulated/Test20r/', save=True, empirical=False) Plot Viterbi Path of Haplotype copying. save: Whether to save the results. empirical: If true, do not load and plot latent states