backboneBP: Summarize the Bootstrape Values of Backbone Nodes

Description Usage Arguments Details Value Examples

View source: R/backboneBP.R

Description

This function defines backbone nodes based on taxa and level, summarizes the boostrape supports of these nodes, and gives the order of trees by scoring the the distribution of the collected bp values.

Usage

1
backboneBP(trees, taxa, level = NULL, plot = TRUE)

Arguments

trees

a list of objects of class "phylo". A list of test trees such as single gene trees.

taxa

a data.frame with tips and groupings. The first column must be the tip names in trees. Other columns specify the their groupings. Can have some tips left as no grouping.

level

can be a character as one of the column names of taxa, or a numeric specifying which column is used as grouping. Defaults as NULL and use the second column of taxa.

plot

a logical specifying whether to generate violin plots for bootstrape values of backbone nodes of each of the trees.

Details

backboneBP first finds and uses only the trees meet all constraints (groupings) in taxa and level to identify backbone nodes. This function returns a list of four: (1) summary: main result, a table contains statistics and scores of trees that meets all constriants; (2) data: a list of modified trees that meets all constraints, to have bootstrape values on backbone nodes and NA on other nodes; (3) plot.data: a data.frame that can be as input to ggplot2 to produce the violin plot; (4) concor.trees: statistics of the number of all trees meet constraints, including those meets partial or no constraints (groupings). This last result can present the consistencies of constraints in trees.

Value

the returned list contains 5 parts: (1) a summary table showing the quantiles and numbers of bp values >= 50 or 70 bp, and the score

Examples

1
2
3
4
5
6
data(Brassidata)
trees <- Brassidata$trees
taxa <- Brassidata$taxaTable
ubb <- backboneBP(trees, taxa = taxa, level=2, plot = FALSE)
# returns NULL when there is no so-called "backbone nodes"
# based on the given groupings

Chien-Hsun/rePhylo documentation built on May 19, 2020, 3:15 a.m.