phylo_ddrc: Calculating clone-to-clone distances, and estimating a...

View source: R/phylo_cnr.R

phylo_ddrcR Documentation

Calculating clone-to-clone distances, and estimating a phylogenetic tree

Description

Calculating clone-to-clone distances, and estimating a phylogenetic tree

Usage

phylo_ddrc(
  cnr,
  root.clone = NULL,
  exclude.clones = NULL,
  dist.method = "bray",
  tree.method = "bal",
  spr = TRUE,
  ...
)

Arguments

cnr

a cnr bundle

root.clone

a single clone to root the tree

exclude.clones

vector of clones to exclude

dist.method

method for calculating cell-to-cell distance (see vegan::vegdist)

tree.method

method for phylogenetic tree construction either "bal", "ols", or "nj". default is "bal"

spr

parameter specific to fastme.bal. Performs Subtree Pruning and Regrafting. Ignored in all other methods. Default is TRUE

...

other parameters passed to root

Value

Creates a cell-to-cell distance matrix, runs heirarchical clustering. By default a phylogenetic tree is constructed using fastme.bal, alternative algorithms are fastme.ols or nj.

  • DDRC.dist clone to clone Bray-Curtis dissimiarly

  • DDRC.phylo phylogenetic tree of class 'phylo' from R/ape

References

Vincent Lefort, Richard Desper, Olivier Gascue. 2015. "FastME 2.0: A Comprehensive, Accurate, and Fast Distance-Based Phylogeny Inference Program". Molecular Biology and Evolution, Volume 32, Issue 10, October 2015, Pages 2798–2800. <https://doi.org/10.1093/molbev/msv150?>

Paradis E, Schliep K (2019). “ape 5.0: an environment for modern phylogenetics and evolutionary analyses in R.” Bioinformatics, *35*, 526-528. <https://doi.org/10.1093/bioinformatics/bty633>.

Oksanen J, Simpson G, Blanchet F, Kindt R, Legendre P, Minchin P, O'Hara R, Solymos P, Stevens M, Szoecs E, Wagner H, Barbour M, Bedward M, Bolker B, Borcard D, Carvalho G, Chirico M, De Caceres M, Durand S, Evangelista H, FitzJohn R, Friendly M, Furneaux B, Hannigan G, Hill M, Lahti L, McGlinn D, Ouellette M, Ribeiro Cunha E, Smith T, Stier A, Ter Braak C, Weedon J (2022). _vegan: Community Ecology Package_. R package version 2.6-4, <https://CRAN.R-project.org/package=vegan>.

Examples


data(cnr)

cnr <- phylo_cnr(cnr)
cnr <- setBrayClusters(cnr)
cnr <- get_cluster_profiles(cnr, cluster.column = "BrayC")

## unrooted cell phylogenetic tree
cnr <- phylo_ddrc(cnr)

cnr$DDRC.phylo
plot(cnr$DDRC.phylo)


## rooted cell phylogenetic tree
cnr <- phylo_ddrc(cnr, root.clone = "C2")

cnr$DDRC.phylo
plot(cnr$DDRC.phylo)

## change method to ols
cnr <- phylo_ddrc(cnr, root.clone = "C2", tree.method = "ols")

cnr$DDRC.phylo
plot(cnr$DDRC.phylo)


SingerLab/gac documentation built on March 23, 2024, 5:15 a.m.