max_parsimony: function to calculate a maximum pasimony phylogenetic tree

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' and 'optim.parsimony'. 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 phylogenetic clustering and to optimise the phylogeny by a maximum parsimony algorithm

Usage

1
max_parsimony(alignment, type, clustering = bionj, outgroup = NULL)

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)

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

Value

the function returns an object of class 'phylo' of the 'ape' package. 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' 'make_tree'

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data(fastaRNA)
data(phylipRNA)
data(phylipProt)
clustalRNA <- load_alignment(system.file('extdata',
                                         'spike_align.aln',
                                         package='firstPackage'),
                             'clustal')
fastaRNAtree <- max_parsimony(alignment=fastaRNA, type=RNA,
                              clustering=fastme.ols)
phylipRNAtree <- max_parsimony(phylipRNA, RNA, fastme.bal)
phylipProtTree <- max_parsimony(phylipProt, protein, outgroup=YP_0010399)
clustalRNAtree <- max_parsimony(clustalRNA, type=RNA, clustering=bionj)
## Not run: plot.phylo(phylipRNAtree, type='u')

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