DemoPlots
Documentation for DemoPlots.
DemoPlots.plot_cumulative_lineagesDemoPlots.plot_demographyDemoPlots.plot_inputDemoPlots.plot_lineagesDemoPlots.plot_remnbpsDemoPlots.xy
DemoPlots.plot_cumulative_lineages — Method
plot_cumulative_lineages(para::Vector, ax, rho; max_t = 1e7, g = 29, k = 0, kwargs...)Plot the cumulative number of lineages coalescing within each epoch as a function of time, given the parameters para.
ax is a pyplot axis, rho is the recombination rate per bp per generation.
Arguments
max_t = 1e7: the furthest time, in generations, at which the coalescent is evaluatedg = 29: arbitrary scaling factor for a generationk = 0: the minimum length of associated IBD segment in bp
Further optional arguments are passed to plot and scatter from pyplot.
DemoPlots.plot_demography — Method
plot_demography(para::Vector{T}, stderrors::Vector{T} ax; kwargs...)
plot_demography(fit::DemoInfer.FitResult, ax; kwargs...)Plot the demographic profile encoded in the parameters inferred by the fit.
ax is the pyplot ax where to plot the demographic profile.
Arguments
max_t = 1e7: the furthest time to plotg = 29: arbitrary scaling factor for a generationrho = 1e-8: recombination rate per bp per generationshift::Float64 = 0.: shift in generations to apply to the epocheshift::Float64 = 0.: additional error to add in quadrature to the standard errors of the epochscolor="tab:red": color of the linealpha = 1: transparency of the linealphapatch = 0.5*alpha: transparency of the confidence interval patchlinewidth = 1: line widthendcoalwidth = 1: line width of the vertical lines indicating when expected coalescing lineages per gen drop below 0.5 and the number of uncoalesced base pairs drop below 1plotendcoal = false: if true the above vertical lines are plotted
Further optional arguments are passed to plot from pyplot.
DemoPlots.plot_input — Method
plot_input(TN, ax; max_t = 1e7, g = 29, kwargs...)Plot the demographic profile encoded in the parameters TN as input.
Arguments
max_t: the furthest time to plotg = 29: arbitrary scaling factor for a generationkwargs...: the keywords that PyPlotplotaccepts
DemoPlots.plot_lineages — Method
plot_lineages(para::Vector, ax, rho; max_t = 1e7, g = 29, k = 0, kwargs...)Plot the number of coalescing lineages as a function of time, given the parameters para.
ax is a pyplot axis, rho is the recombination rate per bp per generation.
Arguments
max_t = 1e7: the furthest time, in generations, at which the coalescent is evaluatedg = 29: arbitrary scaling factor for a generationk = 0: the minimum length of associated IBD segment in bp
Further optional arguments are passed to plot and scatter from pyplot.
DemoPlots.plot_remnbps — Method
plot_remnbps(para::Vector, ax; max_t = 1e7, g = 29, kwargs...)Plot the remaining number of base pairs as a function of time, given the parameters para.
ax is a pyplot axis.
Arguments
max_t = 1e7: the furthest time, in generations, at which the coalescent is evaluatedg = 29: arbitrary scaling factor for a generation
Further optional arguments are passed to plot and scatter from pyplot.
DemoPlots.xy — Method
xy(h::HistogramBinnings.Histogram{T, 1, E}; mode = :density) where {T, E}Return the midpoints and the weights of the histogram h.
Arguments
h: the histogrammode: the normalization mode,:densitynormalizes counts by bins widths