DemoPlots

Documentation for DemoPlots.

DemoPlots.plot_cumulative_lineagesMethod
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 evaluated
  • g = 29: arbitrary scaling factor for a generation
  • k = 0: the minimum length of associated IBD segment in bp

Further optional arguments are passed to plot and scatter from pyplot.

source
DemoPlots.plot_demographyMethod
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 plot
  • g = 29: arbitrary scaling factor for a generation
  • rho = 1e-8: recombination rate per bp per generation
  • shift::Float64 = 0.: shift in generations to apply to the epoch
  • eshift::Float64 = 0.: additional error to add in quadrature to the standard errors of the epochs
  • color="tab:red": color of the line
  • alpha = 1: transparency of the line
  • alphapatch = 0.5*alpha: transparency of the confidence interval patch
  • linewidth = 1: line width
  • endcoalwidth = 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 1
  • plotendcoal = false: if true the above vertical lines are plotted

Further optional arguments are passed to plot from pyplot.

source
DemoPlots.plot_inputMethod
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 plot
  • g = 29: arbitrary scaling factor for a generation
  • kwargs...: the keywords that PyPlot plot accepts
source
DemoPlots.plot_lineagesMethod
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 evaluated
  • g = 29: arbitrary scaling factor for a generation
  • k = 0: the minimum length of associated IBD segment in bp

Further optional arguments are passed to plot and scatter from pyplot.

source
DemoPlots.plot_remnbpsMethod
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 evaluated
  • g = 29: arbitrary scaling factor for a generation

Further optional arguments are passed to plot and scatter from pyplot.

source
DemoPlots.xyMethod
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 histogram
  • mode: the normalization mode, :density normalizes counts by bins widths
source