estimatePhangornTreeAll: Estimates a ML trees from a given topology for a list of...

View source: R/estimateTreeFuncs.R

estimatePhangornTreeAllR Documentation

Estimates a ML trees from a given topology for a list of alignments. Wirtes a text file compatble with readTrees(). Uses 'pml' and 'optim.pml' from the 'phangorn' package to estimate the tree.

Description

Estimates a ML trees from a given topology for a list of alignments. Wirtes a text file compatble with readTrees(). Uses 'pml' and 'optim.pml' from the 'phangorn' package to estimate the tree.

Usage

estimatePhangornTreeAll(
  alnfiles = NULL,
  alndir = NULL,
  pattern = NULL,
  treefile,
  output.file = NULL,
  submodel = "LG",
  type = "AA",
  format = "fasta",
  k = 4,
  ...
)

Arguments

alnfiles

A character vector of paths to alignment files. Such as one produced by list.files. Either alnfiles or alndir must be supplied.

alndir

The path to directories with alignment files. Trees will be named with the alignment file name after stripping the extension. Either alnfiles or alndir must be supplied.

pattern

An optional regular expression for files in the alndir director. As in ".*fasta".

treefile

The path to the master tree file (whose topology will be used to generate the tree)

output.file

The file where the output trees will be written. This file can be read with readTrees().

submodel

Substitution model to be used to estimate the tree

type

"AA" for amino acid or "DNA" for DNA

format

Format of the alignment file (commonly used formats include fasta and phylip)

k

Number of intervals in the discrete gamma distribution for 'pml'

...

Further arguments passed to 'pml' or 'optim.pml'

Value

A list: 'tree.opt' is the tree from the optimized output of 'optim.pml'; 'results.opt' is the optimized output of 'optim.pml'; 'results.init' is the initial results estimated by 'pml'

See Also

phyDat for alignment formats, pml and optim.pml for tree estimation


nclark-lab/RERconverge documentation built on March 2, 2024, 8:51 a.m.