plotRates: Plot RRphylo rates at a specified node

Description Usage Arguments Value Examples

View source: R/plotRates.R

Description

The function plotRates plots the RRphylo rates computed for a given clade as compared to the rates computed for the rest of the tree.

Usage

1
plotRates(RR,node,export.tiff =TRUE,foldername)

Arguments

RR

an object produced by RRphylo.

node

the node subtending the clade of interest.

export.tiff

if TRUE the function save a "rate_bars.tiff" file inside the working directory. It is TRUE by default.

foldername

the path of the folder where plots are to be found.

Value

The function produces two barplots. On the left side, the rates (in absolute values) computed for the focal clade (blue) are plotted against the rates of the rest of the tree (green). On the right side, the absolute rates of individual branches of the focal clade are collated in increasing rate value (blue bars), and contrasted to the average rate computed over the rest of the tree branches (the vertical red line). It also returns the rate values for both nodes and species descending from the focal node.

Examples

1
2
3
4
5
6
7
8
data("DataApes")
DataApes$PCstage->PCstage
DataApes$Tstage->Tstage
cc<- 2/parallel::detectCores()

RRphylo(tree=Tstage,y=PCstage,clus=cc)->RR

plotRates(RR,node=72,foldername=tempdir(),export.tiff = TRUE)

RRphylo documentation built on July 14, 2020, 1:06 a.m.