Learn R Programming

rphast (version 1.6.9)

prune.tree: Prune a Tree

Description

Prune sequences from a file

Usage

prune.tree(tree, seqs, all.but = FALSE)

Arguments

tree

A vector of character strings, each containing a newick tree

seqs

The sequences to prune from the trees

all.but

A logical value. If false, prunes all the named sequences from the tree. If TRUE, prunes all sequences except the ones named.

Value

a vector of character strings representing the pruned trees.

Examples

Run this code
# NOT RUN {
trees <- c("((hg18, panTro2), mm9);",
           "((hg18:0.142679,(mm9:0.083220,rn4:0.090564):0.269385):
                0.020666,canFam2:0.193569);")
prune.tree(trees, c("panTro2", "mm9"), all.but=TRUE)
prune.tree(trees, "hg18", all.but=FALSE)
# }

Run the code above in your browser using DataLab