knitr::opts_chunk$set(echo = FALSE,warning=FALSE, message=FALSE, out.width = "49%")
## This report requires the samsa2 output files generated by the Samsa2 App
debug <- FALSE
library(DESeq2)
library(ggplot2)
library(scales)
library(reshape2)
library(knitr)
library(vegan)
library(pheatmap)
param = readRDS("param.rds")
org_Shannon_Simpson <- readRDS("org_Shannon_Simpson.rds")
func_Shannon_Simpson <- readRDS("func_Shannon_Simpson.rds")
org_div_graph <- readRDS("org_div_graph.rds")
func_div_graph <- readRDS("func_div_graph.rds")
org_PCA <- readRDS("org_PCA.rds")
func_PCA <- readRDS("func_PCA.rds")
org_heatmap <- readRDS("org_heatmap.rds")
func_heatmap <- readRDS("func_heatmap.rds")
org_combined <- readRDS("org_combined.rds")
func_combined <- readRDS("func_combined.rds")
org_volcano <- readRDS("org_volcano.rds")
func_volcano <- readRDS("func_volcano.rds")
org_deseq_results <- readRDS("org_deseq_results.rds")
func_deseq_results <- readRDS("func_deseq_results.rds")

{.tabset}

Diversity

Lineage diversity

show(org_Shannon_Simpson)
plot(org_div_graph)

Functional diversity

show(func_Shannon_Simpson)
plot(func_div_graph)

Differences in lineage-level transcript abundance

plot(org_PCA)
colors <- colorRampPalette( rev(brewer.pal(9, "Blues")) )(255)
pheatmap(org_heatmap, 
         cellwidth = 5, 
         cellheight = 5,
         treeheight_row = 40,
         treeheight_col = 40, 
         fontsize = 5, 
         cex = 1)
org_combined
plot(org_volcano)
table <- org_deseq_results[order(org_deseq_results$log2FoldChange,decreasing=TRUE),]
ezInteractiveTableRmd(table[1:10,])
table <- org_deseq_results[org_deseq_results$pvalue < 0.05,]
table <- table[order(table$log2FoldChange),]
ezInteractiveTableRmd(table[1:10,])

Differences in functional-level transcript abundance

plot(func_PCA)
colors <- colorRampPalette( rev(brewer.pal(9, "Blues")) )(255)
pheatmap(func_heatmap, 
         cellwidth = 5, 
         cellheight = 5,
         treeheight_row = 40,
         treeheight_col = 40, 
         fontsize = 5, 
         cex = 1)
func_combined
plot(func_volcano)
table <- func_deseq_results[order(func_deseq_results$log2FoldChange,decreasing=TRUE),]
ezInteractiveTableRmd(table[1:10,])
table <- func_deseq_results[func_deseq_results$pvalue < 0.05,]
table <- table[order(table$log2FoldChange),]
ezInteractiveTableRmd(table[1:10,])


uzh/ezRun documentation built on May 4, 2024, 3:23 p.m.