patproPlotTwo: Generate Patient Profile of Two Plots.

Description Usage Arguments Details Author(s) References Examples

Description

Use this function to generate a patient profile containing two figures. The figures included are the alpha diversity and top taxa plots over time. This should be used when there is no bacterial load data, or when the normalized top taxa plot is used.

Usage

1
2
3
4
5
patproPlotTwo(alpha.div.plot, 
	norm.top.taxa.plot, 
	patpro.plot.title, 
	legend.one.h=0.70, 
	legend.two.h=0.30)

Arguments

alpha.div.plot

The alpha diversity plot to be used in the patient profile.

norm.top.taxa.plot

The normalized or non-normalized taxonomic relative abundance plot to be included in the patient profile.

patpro.plot.title

The desired plot title.

legend.one.h

Allows the user to manually set the height of the first figure legend (decimal digit between 0 and 1). Very important if adjusting legend text size. Defalut is 0.70.

legend.two.h

Allows the user to manually set the height of the second figure legend (decimal digit between 0 and 1). Very important if adjusting legend text size. Defalut is 0.30.

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.

Author(s)

Geoffrey Hannigan <ghanni@upenn.edu>, Loesche MA, Hodkinson BP, Mehta S, Elizabeth Grice <egrice@upenn.edu>

References

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Plot individual patient
data("PatProAlphaDiv",package="patPRO")
data("PatProMap",package="patPRO")
data("PatProOTU",package="patPRO")
data("PatProBacLoad",package="patPRO")
# Alpha Diversity
mergedMapAlpha <- mergeMapMetaData(map.file=PatProMap, 
	merging.file=PatProAlphaDiv, 
	map.sub.id="SubjectID", 
	map.tmpt="Time_point", 
	map.smpl.id="SampleID", 
	sample.id.col="SampleID")
testNormAlphaDiv <- normalizeAlphaDiv(mergedMapAlpha, c("chao1","shannon"), 1)
alphaDivPlot <- plotNormalizedAlphaDiv(testNormAlphaDiv, 
	c("chao1","shannon"), 
	plot.title="Subject One Diversity", 
	color.brewer.set="Set2", 
	legend.text.size = 12)
# Absolute Abundance Estimation
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)
mergedMapBacLoad <- mergeMapMetaData(map.file=PatProMap, 
	merging.file=PatProBacLoad, 
	map.sub.id="SubjectID", 
	map.tmpt="Time_point", 
	map.smpl.id="SampleID", 
	sample.id.col="SampleID")
absAbundOutDf <- topAbsAbundDataFrame(top5RelAbund, mergedMapBacLoad, bac.load.id="Num_Bacteria")
normTopTaxa <- topAbsAbundPlot(absAbundOutDf, 
	1, 
	bac.load.col="Num_Bacteria", 
	plot.title="Subject One Normalized Taxonomy", 
	color.brewer.set="Set2", 
	mark.events=TRUE, 
	mark.times=c(2,6), 
	mark.text="Surgery", 
	legend.text.size = 8)
patproPlotTwo(alphaDivPlot, normTopTaxa, "Subject One Profile")

patPRO documentation built on May 1, 2019, 10:56 p.m.

Related to patproPlotTwo in patPRO...