hapsburg.figures.plot_posterior

Main Inference Class for HMM. Wrapper for Inerence of Posterior. @ Author: Harald Ringbauer, 2019, All rights reserved

Module Contents

Functions

load_data([folder, empirical, fullpost, viterbi, ...])

Load and return the Data from one Data Folder

process_read_counts(read_counts[, m])

Return Readcount that have at least m reads for both Ref and Alt

plot_posterior_cm([folder, savepath, empirical, plot, ...])

Plot Viterbi Path of Haplotype copying.

plot_viterbi([folder, save, empirical])

Plot Viterbi Path of Haplotype copying

plot_posterior([folder, save, empirical])

Plot Viterbi Path of Haplotype copying.

hapsburg.figures.plot_posterior.load_data(folder='../Simulated/Example0/', empirical=False, fullpost=False, viterbi=False, readcounts=True)

Load and return the Data from one Data Folder

hapsburg.figures.plot_posterior.process_read_counts(read_counts, m=1)

Return Readcount that have at least m reads for both Ref and Alt

hapsburg.figures.plot_posterior.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) 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

hapsburg.figures.plot_posterior.plot_viterbi(folder='../Simulated/Test20r/', save=True, empirical=False)

Plot Viterbi Path of Haplotype copying

hapsburg.figures.plot_posterior.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