Learn R Programming

patPRO (version 1.1.0)

plotTopTaxa: Plot a Specific Patient Relative Abundance of Top Taxa.

Description

Uses the results from the top.rel.abund.data.frame function for graphing relative abundance of the top taxonomy.

Usage

plotTopTaxa(top.taxa.data.frame, pat.id, subject.id.col="SubjectID", tmpt.id.col="Time_point", y.lab="Percent Relative Abundance", x.lab="Time Point", plot.title, mark.events=FALSE, mark.times, mark.text="", color.brewer.set="", color.manual.set="", legend.text.size = 7)

Arguments

top.taxa.data.frame
The data.frame from the top.rel.abund.data.frame function which will be used for plotting the top taxa.
pat.id
The patient identifier to specify the case which should be visualized.
subject.id.col
Name of the subject ID column found in x. Default is "SubjectID".
tmpt.id.col
Name of the time point column found in x. Default is "Time_point".
y.lab
Name of the y axis label to be used in the plot. Default is "Percent Relative Abundance".
x.lab
Name of the x axis label to be used in the plot. Default is "Time Point".
plot.title
The desired plot title.
mark.events
Specify whether arrows will be used to specify specific time events. Set as TRUE for using arrows. Default is FALSE.
mark.times
The time points to be marked with arrows when mark.events=TRUE. These numbers need to be set as a vector.
mark.text
The text to be used to annotate the arrow markers when mark.events=TRUE.
color.brewer.set
Name of the color brewer palet to use for plot coloring. Default value uses default colors.
color.manual.set
Name of the manually specified color palet to use for plot coloring. Default value uses default colors.
legend.text.size
Allows the user to manually set the figure legend text size digit. Default is size 7.

Details

Package:
patPRO
Type:
Package
Version:
1.0.0
Date:
2015-09-18
License:
GPLv3
An overview of how to use the package, including the most important functions, is included in the supplemental R notebook patPROExampleWorkflow.html.

References

patPRO: An R package for the visualization of longitudinal microbiome data. Hannigan GD, Loesche MA, Hodkinson BP, Mehta S, Grice EA.

Examples

Run this code
data("PatProOTU",package="patPRO")
data("PatProMap",package="patPRO")
transTestRelAbund <- transposeRelAbund(PatProOTU)
mergedMapTransRA <- mergeMapMetaData(map.file=PatProMap, 
	merging.file=transTestRelAbund, 
	map.sub.id="SubjectID", 
	map.tmpt="Time_point", 
	map.smpl.id="SampleID", 
	sample.id.col="SampleID")
top5RelAbund <- topRelAbundDataFrame(x=mergedMapTransRA, top.taxa.num=5)
topTaxa <- plotTopTaxa(top5RelAbund, 
	1, 
	plot.title="Subject One Taxonomy", 
	color.brewer.set="Set2", 
	mark.events=TRUE, 
	mark.times=c(2,6), 
	mark.text="Surgery", 
	legend.text.size=8)

Run the code above in your browser using DataLab