Description Usage Arguments Details Author(s) References Examples
Use this function to generate a patient profile containing three figures. The figures included are the alpha diversity, bacterial load, and top taxa plots over time. This should be used when bacterial load information is available, and the normalized relative abundance plot is not desired.
1 2 3 4 5 6 | patproPlotThree(alpha.div.plot,
bac.load.plot,
top.taxa.plot,
patpro.plot.title,
legend.one.h=0.77,
legend.two.h=0.25)
|
alpha.div.plot |
The alpha diversity plot to be used in the patient profile. |
bac.load.plot |
The bacterial load plot to be used 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.77. |
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.25. |
top.taxa.plot |
The relative abundance plot to be used in the patient profile. |
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.
Geoffrey Hannigan <ghanni@upenn.edu>, Loesche MA, Hodkinson BP, Mehta S, Elizabeth Grice <egrice@upenn.edu>
patPRO: An R package for the visualization of longitudinal microbiome data. Hannigan GD, Loesche MA, Hodkinson BP, Mehta S, Grice EA.
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 45 46 47 48 | # 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)
# Bacterial Load
mergedMapBacLoad <- mergeMapMetaData(map.file=PatProMap,
merging.file=PatProBacLoad,
map.sub.id="SubjectID",
map.tmpt="Time_point",
map.smpl.id="SampleID",
sample.id.col="SampleID")
bacLoad <- plotBacterialLoad(mergedMapBacLoad,
1,
bac.load.col="Num_Bacteria",
plot.title="Subject One Bacterial Load")
# Taxa Relative Abundance
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)
# Plot three
patproPlotThree(alphaDivPlot, bacLoad, topTaxa, "Subject One Profile")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.