MyNixOS website logo
Description

Create Muller Plots of Evolutionary Dynamics.

Create plots that combine a phylogeny and frequency dynamics. Phylogenetic input can be a generic adjacency matrix or a tree of class "phylo". Inspired by similar plots in publications of the labs of RE Lenski and JE Barrick. Named for HJ Muller (who popularised such plots) and H Wickham (whose code this package exploits).

CRAN_Status_Badge

ggmuller

Create Muller Plots of Evolutionary Dynamics

Installation

To install the CRAN version:

install.packages("ggmuller")
library(ggmuller)

To install the github version using devtools:

install.packages("devtools")
library(devtools)
  
install_github("robjohnnoble/ggmuller")
library(ggmuller)

Basic usage

The main functions in ggmuller are get_Muller_df and Muller_plot, which we can run on some data included in the package:

# reformat data ready for plotting:
Muller_df <- get_Muller_df(example_edges, example_pop_df)

# generate the plot:
Muller_plot(Muller_df)

How-to guides

The best place to start is the CRAN vignette, which includes an overview of features and some worked examples.

An older, slightly different set of instructions can be found in a blog post on Visualizing evolutionary dynamics with ggmuller.

Version history

0.5.6: Avoid loading or importing ape package, to avoid namespace conflict between ape and dplyr.

0.5.5: Optional removal of rare types is now much more efficient for large data sets.

0.5.4: Fix a rare bug; add tip labels to trees.

0.5.3: get_Muller_df now fills all columns when adding missing rows (issue #10); polygon edges now aren't drawn by default.

0.5.2: Can cope with the special case of only one genotype.

0.5.1: Can use brewer palettes.

0.5: Smoother plots from sparse data; time column can now be called "Time" instead of "Generation"; replace missing population sizes with zeroes.

0.4: Smoother plotting by default when genotypes suddenly grow from zero to large frequencies; new "start_positions" parameter can be used to override this default.

0.3: Bug fixes; in particular, the "threshold" option is replaced by "cutoff" (genotypes whose abundance never exceeds "cutoff" are removed, whereas previously genotypes whose abundance never exceeded twice "threshold" were removed).

0.2.2: Bug fixes and deprecation of superfluous options.

0.2.1: Correct mistake in calculating population sizes for Muller_pop_plot.

0.2.0: New function Muller_pop_plot shows variation in population size as well as frequency (also known as a fish plot).

0.1.3: Compatibility with dplyr version 0.7.2; add option for smoother plotting of genotype emergence points.

0.1.2: Better plotting of the points at which genotypes emerge.

0.1.1: Essential update for compatibility with ggplot2 version 2.2.0.

0.1.0: First release.

Citation

To cite ggmuller in publications please use

Robert Noble (2019). ggmuller: Create Muller Plots of Evolutionary Dynamics. R package version 0.5.3. doi:10.5281/zenodo.591304 https://CRAN.R-project.org/package=ggmuller

A BibTeX entry for LaTeX users is

@Manual{,
title = {ggmuller: Create Muller Plots of Evolutionary Dynamics},
author = {Robert Noble},
year = {2019},
note = {R package version 0.5.3},
url = {https://CRAN.R-project.org/package=ggmuller},
doi = 10.5281/zenodo.591304
}

Please amend the version number as appropriate.

Metadata

Version

0.5.6

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows