make_tree: function to calculate a distance-based phylogenetic tree with...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/functions.R

Description

this function is a wrapper around the functions 'dist.alignment', 'dist.dna', 'nj', 'bionj', 'fastme.bal', 'fastme.ols', 'boot.phylo' and 'plot.phylo'. it takes a sequences alignment in format 'alignment' of 'DNAbin' matrix and perform all transformations and steps to calculate a phylogenetic distance matrix based on similarity or identity in the case of proteins or based in evolutionary models in the case of DNA or RNA, to perform a distance-based phylogenetic clustering, to validate the resulting phylogeny by a bootstrapping method and to draft plot the results for exploratory visualization in order to adjust and compare the calculations

Usage

1
2
3
4
5
6
7
8
make_tree(
  alignment,
  type,
  model = TN93,
  clustering = bionj,
  outgroup = NULL,
  plot = u
)

Arguments

alignment

an object of class alignment or DNAbin containing a DNA, RNA or protein sequences alignment

type

a character string without ” specifying the type of sequences, i.e. DNA, RNA or protein (without default value)

model

a character string without ” specifying the model to be used for the calculation of the distances matrix, i.e. raw, N, TS, TV, JC69, K80, F81, K81, F84, BH87, T92, TN93 (default), GG95, logdet, paralin, indel, or indelblock

clustering

a character string without ” specifying the clustering algorithm to be used to build the phylogenetic tree, i.e classic neighbor-joining (nj), improved neighbor-joining (bionj) (default), NJ or bio-NJ from a distance matrix with possibly missing values (njs, bionjs), balanced minimum evolution principle (fastme.bal), ordinary least-squares minimum evolution principle (fastme.ols)

outgroup

a character string without ” specifying a taxon to be taken as root for building the tree. The default value is NULL leading to an unrooted tree

plot

a character string without ” specifying the type of phylogenetic plot to be drawn for visualization of the phylogenetic calculations, i.e. phylogram, cladogram, fan, unrooted (default), radial or any unambiguous abbreviation of these

Value

the function returns an object of class phylo of the 'ape' package and a draft plot to visualize the phylogenetic calculations. More advanced and elaborated plots can be drawn in later steps based on the tree data of the phylo class object

Author(s)

gerardo esteban antonicelli

See Also

'retrieve_seqs' 'print_alignment' 'clean_alignment' 'load_alignment' 'max_parsimony'

Examples

1
2
3
4
5
6
data(phylipProt)
data(phylipRNA)
data(clustalRNA)
phylipProtTree <- make_tree(phylipProt, type=protein, model=K80, outgroup=YP_0010399)
phylipRNATree <- make_tree(phylipRNA, type=RNA, plot=clado)
clustalRNATree <- make_tree(clustalRNA, type=RNA)

geantonicelli/firstPackage documentation built on Aug. 24, 2020, 3:14 a.m.