createAndPlot: Create and Plot a Tree from a Data Set

Description Usage Arguments Details Value Author(s) Examples

View source: R/createAndPlot.R

Description

This function combines the createTrees and plotTree functions to create and plot a set of trees.

Usage

1
2
3
4
	createAndPlot(data, samples = NULL, level = "genus", colors = NULL, 
		divisions = NULL, main = NULL, sub = "", showTipLabel = TRUE, 
		showNodeLabel = FALSE, displayLegend = TRUE, onePerPage = FALSE, 
		split = ".")

Arguments

data

A data frame in which each column contains the rdp read counts for every taxa given in the row names.

samples

Deprecated. Only send the columns in data to plot.

level

The depth the tree creation will go down to (kingdom, phylum, class, order, family, genus, species, subspecies).

colors

A vector of colors to be applied to the branches in the plot.

divisions

A vector of numbers to be used as break points to assign different colors.

main

A custom title(s) for the plot(s).

sub

A custom subtitle for the plot.

showTipLabel

Hides the tip labels if 'FALSE' otherwise it shows all non-zero tip labels.

showNodeLabel

Hides the interior node labels if 'FALSE' otherwise it shows all non-zero node labels.

displayLegend

Enables the display of a legend of the branch colors and divisions when 'TRUE'.

onePerPage

If 'TRUE' one tree will be plotted per page, if 'FALSE' four will be displayed per page.

split

This is the character that separates the taxa levels in the row names.

Details

Notes:

  1. For 'level' k, p, c, o, f, g, s and ss can be used in place of kingdom, phylum, class, order, family, genus, species and subspecies respectively.

  2. The values for division should directly relate to the values of your data, i.e. if your data ranges from 0 to 50000 reads you should adjust the divisions to fit your data.

Value

A plot of the tree(s).

Author(s)

Berkley Shands, Patricio S. La Rosa, Elena Deych, William D. Shannon

Examples

1
2
3
4
	data(saliva)
	
	### Plots the trees in column 2 and 3 in 'Saliva'
	createAndPlot(saliva[,2:3])

HMPTrees documentation built on May 2, 2019, 4:02 p.m.