Package 'MullerPlot'

Title: Generates Muller Plot from Population/Abundance/Frequency Dynamics Data
Description: Generates Muller plot from parental/genealogy/phylogeny information and population/abundance/frequency dynamics data. Muller plots are plots which combine information about succession of different OTUs (genotypes, phenotypes, species, ...) and information about dynamics of their abundances (populations or frequencies) over time. They are powerful and fascinating tools to visualize evolutionary dynamics. They may be employed also in study of diversity and its dynamics, i.e. how diversity emerges and how changes over time. They are called Muller plots in honor of Hermann Joseph Muller which used them to explain his idea of Muller's ratchet (Muller, 1932, American Naturalist). A big difference between Muller plots and normal box plots of abundances is that a Muller plot depicts not only the relative abundances but also succession of OTUs based on their genealogy/phylogeny/parental relation. In a Muller plot, horizontal axis is time/generations and vertical axis represents relative abundances of OTUs at the corresponding times/generations. Different OTUs are usually shown with polygons with different colors and each OTU originates somewhere in the middle of its parent area in order to illustrate their succession in evolutionary process. To generate a Muller plot one needs the genealogy/phylogeny/parental relation of OTUs and their abundances over time. MullerPlot package has the tools to generate Muller plots which clearly depict the origin of successors of OTUs.
Authors: Farnoush Farahpour [aut, cre], Mohammadkarim Saeedghalati [aut], Daniel Hoffmann [aut]
Maintainer: Farnoush Farahpour <[email protected]>
License: GPL-3
Version: 0.1.3
Built: 2024-11-15 02:50:08 UTC
Source: https://github.com/cran/MullerPlot

Help Index


Attributes of OTUs

Description

A matrix with 3 columns and 8 rows.

Usage

data(Attributes)

Format

A matrix with 3 columns and 8 rows.

Details

The first column contains OTU names:

"RBL636","rkd D5891 bcc","ylnC-48","iglK f12","BAeR G11","nuhj-25","HwrK-41","QecF*22"

The second column contains parents of the corresponding OTUs:

NA ,"RBL636","RBL636","ylnC-48","rkd D5891 bc","iglK f12","rkd D5891 bc","nuhj-25"

and the third column contains colors of corresponding OTUs.


Muller.plot

Description

Generates Muller plot from data of population/abundance/frequency dynamics and parental/genealogy/phylogeny relation

Usage

Muller.plot(
  attributes,
  population.data,
  data.method,
  time.interval.method = "linear",
  ...
)

Arguments

attributes

A matrix or dataframe with two or three columns which contains information about name, parent and color of OTUs. See details.

population.data

a matrix or data frame which contains information about population/abundance/frequency dynamics. See details.

data.method

determines the method which is used for population.data. This must be one of "list" or "table". See details of population.data.

time.interval.method

determines the method which is used for scale of time/generation axis. This must be one of "linear" or "equal". See details.

...

Arguments to be passed as graphical parameters (see par).

Details

attributes:

First column (character or numeric) must contain OTU names, the second column (character or numeric) must contain parents of corresponding OTUs and the third column (optional) can contain colors of corresponding OTUs. The order of OTUs in the first column determines the order of sister OTUs (OTUs with the same parent) in the Muller plot. Those parents which are not present in the OTU list (first column) or in the population dynamics must be substituted by NA. At least one NA must exist in the second column. All the OTUs present in the rownames of population.data must exist in the first column of attributes (names). If third column is not provided, random color will be assigned to OTUs.

population.data:

When data.method is "list" population.data must have 3 columns. The first column (character or numeric) contains OTU names. The second column (numeric) contains times or generations. The third column (character) contains abundances of corresponding OTU at corresponding time. When data.method is "table" population.data must be an OTU table. rownames of population.data must be OTU names and colnames of it must be times or generations. Each column contains abundance of OTUs at that time/generation.

time.interval.method:

"linear" means that distances between subsequent time points on time/generation axis is linear. "equal" means that regardless of the values in time/generation points, subsequent time points have equal distance.

Value

OTU names and corresponding colors will be returned.

Examples

# load information of population/abundance/frequency dynamics as list
 data(PopulationDataList)
 # load attributes of OTUs (contains name, parent and color of OTUs)
 data(Attributes)
 # Muller plot
 Muller.plot(attributes = Attributes, population.data = PopulationDataList,data.method = "list",
             time.interval.method = "linear")

 # load information of population/abundance/frequency dynamics as table
 data(PopulationDataTable)
 # Muller plot
 Muller.plot(attributes = Attributes, population.data = PopulationDataTable,data.method = "table")

MullerPlot: A package for generating Muller plot from population/abundance/frequency dynamics and parental/geneaolgy/phylogeny relation.

Description

This package generates Muller plot from parental/genealogy/phylogeny relation and population/abundance/frequency dynamics. Muller plots are plots which combine information about succession of different OTUs (genotypes, phenotypes, species, ...) and information about dynamics of their abundances (populations or frequencies) over time. They are powerful and fascinating tools to visualize evolutionary dynamics. They may be employed also in study of diversity and its dynamics, i.e. how diversity emerges and how changes over time. They called Muller plots in honor of Hermann Joseph Muller which used them to explain his idea of Muller's ratchet (H.J. Muller, The American Naturalist 66.703 (1932): 118-138).

A big difference between Muller plots and normal box plots of abundances is that a Muller plot depicts not only the relative abundances but also succession of OTUs based on their genealogy/phylogeny/parental relation. In a Muller plot, horizontal axis is time/generations and vertical axis represents relative abundances of OTUs at the corresponding times/generations. Different OTUs are usually shown with polygons with different colors and each OTU originates somewhere in the middle of its parent area in order to illustrate their succession in evolutionary process.

To generate a Muller plot one needs the genealogy/phylogeny/parental relation of OTUs and their abundances over time.

MullerPlot package has the tools to generate Muller plots which clearly depict the origin of successors of OTUs.


Population/Abundance data of OTUs over time for "list" method

Description

This data is a small artificial data which contains information about population/abundance of some artificial OTUs. When data.method in Muller.plot function is "list" then population.data must be a matrix or data frame with 3 columns.

Usage

data(PopulationDataList)

Format

A data frame with 3 columns and 382 rows.

Details

Here the first column contains OTU names: "RBL636","rkd D5891 bcc","ylnC-48","iglK f12","BAeR G11","nuhj-25","HwrK-41","QecF*22"

The second column contains time steps in which the corresponding OTUs are present in the dynamics.

The third column contains populations/abundances of corresponding OTUs at corresponding times.


Population/Abundance data of OTUs over time for "table" method

Description

This data is a small artificial data which contains information about population/abundance of some artificial OTUs. When data.method in Muller.plot function is "table" then population.data must be a matrix or data frame with N rows and T columns, which N is the number of OTUs and T is the number of time steps or generations with provided abundances (or the number of samples). Here N=8 and T=101.

Usage

data(PopulationDataTable)

Format

A matrix with 101 columns and 8 rows.

Details

"rownames" of this matrix/data frame must be OTU names:

"RBL636","rkd D5891 bcc","ylnC-48","iglK f12","BAeR G11","nuhj-25","HwrK-41","QecF*22"

and "colnames" must be time steps or generations.

The Matrix contains abundance of each OTU at each time step.