```r
knitr::opts_chunk$set(echo = TRUE,warning=FALSE, message=FALSE, out.width = "49%")
debug <- FALSE
```r ## heatmapOrgAbundPlot <- summaryHeatmap(orgDFforHeatmap, isGroupThere, dataset=dataset, numberOfTopNCategories) heatmapFuncAbundPlot <- summaryHeatmap(funcDFforHeatmap, isGroupThere, dataset=dataset, numberOfTopNCategories)
diffTableOrg <- metagMetatrDifferentialAnalysis_tableAndPlots(orgDFforHeatmap, dataset, group,sampleGroup,refGroup, N=numberOfTopNCategories) diffTableFunc <- metagMetatrDifferentialAnalysis_tableAndPlots(funcDFforHeatmap, dataset, group,sampleGroup,refGroup, N=numberOfTopNCategories)
boxBarPlotOrgData <- orgFuncHeatmaptoBoxPlotPrep(orgDFforHeatmap, dataset,group,N=10) boxBarPlotFuncData <- orgFuncHeatmaptoBoxPlotPrep(funcDFforHeatmap, dataset,group,N=10) boxPlotOrg <- ggplot(boxBarPlotOrgData,aes(x=boxBarPlotOrgData[[group]], y=abund,fill=boxBarPlotFuncData[[group]]))+ geom_boxplot()+stat_compare_means(size=2) + facet_wrap(vars(ID)) + labs(fill=group) + theme(axis.title.x = element_blank(),strip.text.x = element_text(size = 4.5)) boxPlotFunc <- ggplot(boxBarPlotFuncData,aes(x=boxBarPlotFuncData[[group]], y=abund,fill=boxBarPlotFuncData[[group]]))+ geom_boxplot()+stat_compare_means(size=2) + facet_wrap(vars(ID)) + labs(fill=group) + theme(axis.title.x = element_blank(),strip.text.x = element_text(size = 4.5)) barPlotOrg <- ggplot(boxBarPlotOrgData,aes(x=sample,y=abund,fill=ID))+ geom_bar(stat="identity") barPlotFunc <- ggplot(boxBarPlotFuncData,aes(x=sample,y=abund,fill=ID))+ geom_bar(stat="identity")
listOfOrgFuncHeatmapDF <- lapply(listOfAnnotatedAbundTable,orgFuncHeatmapPrep, diffTableFunc=diffTableFunc) names(listOfOrgFuncHeatmapDF) <- names(listOfAnnotatedAbundTable) listOfOrgBasedOrgFuncHeatmap <- lapply(names(listOfOrgFuncHeatmapDF), function(x)summaryHeatmap(data.frame(t(listOfOrgFuncHeatmapDF[[x]])), FALSE,numberOfTopNCategories=5, plotTitle=x)) listOfOrgBasedOrgFuncHeatmapForGrid <- lapply(listOfOrgBasedOrgFuncHeatmap[c(1,4)], function(x)x()[[4]]) ### listOfFuncBasedOrgFuncHeatmap <- lapply(names(listOfOrgFuncHeatmapDF), function(x)summaryHeatmap(listOfOrgFuncHeatmapDF[[x]], FALSE,numberOfTopNCategories=5, plotTitle=x)) listOfFuncBasedOrgFuncHeatmapForGrid <- lapply(listOfFuncBasedOrgFuncHeatmap[c(1,4)], function(x)x()[[4]])
Started on r format(Sys.time(), "%Y-%m-%d %H:%M:%S")
heatmapOrgAbundPlot()
DT::datatable(diffTableOrg$tableToReport)
plot(barPlotOrg)
plot(boxPlotOrg)
heatmapFuncAbundPlot()
DT::datatable(diffTableFunc$tableToReport)
plot(barPlotFunc)
plot(boxPlotFunc)
grid.arrange(arrangeGrob(grobs = listOfFuncBasedOrgFuncHeatmapForGrid, ncol=2))
grid.arrange(arrangeGrob(grobs = listOfOrgBasedOrgFuncHeatmapForGrid, ncol=2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.