Commit 656219d4 authored by svolant's avatar svolant
Browse files

Merge branch 'master' of https://projets.pasteur.fr/git/meta16s

parents 3fedc910 bda2c3fb
if (!require("Rcpp")){
install.packages("Rcpp")
}
if(!require(shiny)){
install.packages("shiny")
library(shiny)
}
if(!require(shinydashboard)){
install.packages('shinydashboard')
library(shinydashboard)
......@@ -51,11 +54,17 @@ if (!require(devtools)) {
install.packages('devtools')
library(devtools)
}
if (!require(BiocInstaller)){
source("https://bioconductor.org/biocLite.R")
biocLite("BiocInstaller")
library(BiocInstaller)
}
# Let us use biomformat instead of biom
if (!require(biomformat)){
library(biomformat)
library(devtools)
devtools::install_github("biomformat", "aghozlane")
library(biomformat)
}
if (!require(scatterD3)) {
......@@ -137,8 +146,13 @@ if(!require(biomformat)){
}
# Allow to upload 50M files
options(shiny.maxRequestSize=50*1024^2)
# Allow to upload 50M files only shaman server
if(Sys.info()["nodename"] == "shaman"){
options(shiny.maxRequestSize=50*1024^2)
}else{
# No limit
options(shiny.maxRequestSize=500000000000000*1024^2)
}
source("Rfunctions/Data_Management.R")
source("Rfunctions/Stat_Model.R")
source("Rfunctions/DiagPlot.R")
......
# SHAMAN: a SHiny Application for Metagenomics ANalysis
[Stevenn Volant](https://research.pasteur.fr/fr/member/stevenn-volant/) (stevenn.volant@pasteur.fr)
[Amine Ghozlane](https://research.pasteur.fr/fr/member/amine-ghozlane/) (amine.ghozlane@pasteur.fr) (@xealf8)
## Contents
- [Introduction](#introduction)
- [Installation](#installation)
- [Citation](#citation)
- [Contact](#contact)
- [Acknowledgements](#acknowledgements)
## Introduction
SHAMAN is dedicated to metagenomic analysis, it includes the normalization, the differential analysis and mutiple visualization.
SHAMAN is based on DESeq2 R package [Anders and Huber 2010](http://www.ncbi.nlm.nih.gov/pubmed/20979621) for the analysis of metagenomic data, as suggested in [McMurdie and Holmes 2014](http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3974642/) and [Jonsson2016](http://www.ncbi.nlm.nih.gov/pmc/articles/PMC4727335/).
SHAMAN robustly identifies the differential abundant genera with the Generalized Linear Model implemented in DESeq2 [Love 2014](http://www.ncbi.nlm.nih.gov/pubmed/25516281).
Resulting p-values are adjusted according to the Benjamini and Hochberg procedure [Benjamini and Hochberg 1995].
The PCOA is performed with the ade4 R package and plots are generated with ggplot2 or D3.js packages.
A presentation about SHAMAN is available [here](www/shaman_presentation.pdf).
SHAMAN is compatible with standard formats for metagenomic analysis. We also provide a complete pipeline for OTU picking and annotation named [MASQUE](https://github.com/aghozlane/masque) used in production at Institut Pasteur.
Hereafter is the global workflow of the SHAMAN application:
<img src="www/Workflow.png" align="center" />
## Installation
SHAMAN is available for R>3.X. The installation, download and execution can all be performed with a small R script :
```
# Load shiny packages
if(!require('shiny')){
install.packages('shiny')
library(shiny)
}
# Install dependencies, download last version of SHAMAN from github and run shaman in one command :
runGitHub('aghozlane/shaman')
```
This script can also be executed as following :
```
chmod +x ./shaman/www/shamanapp.R && Rscript ./shaman/www/shamanapp.R
```
## Citation
No papers about SHAMAN have been published yet, but a manuscript is in preparation.
Publication using SHAMAN :
- A bacteriocin from epidemic Listeria strains alters the host intestinal microbiota to favor infection. Quereda JJ, Dussurget O, Nahori MA, Ghozlane A, Volant S, Dillies MA, Regnault B, Kennedy S, Mondot S, Villoing B, Cossart P, Pizarro-Cerda J.; PNAS 2016 [PUBMED](http://www.ncbi.nlm.nih.gov/pubmed/27140611).
## Contact
If you have any comments, questions or suggestions, or need help to use SHAMAN, please contact authors [here](shaman@pasteur.fr).
## Acknowledgements
The main contributors to SHAMAN:
Hugo Varet (Coding, testing, feature suggestions)
Marie-Agnès Dillies (Evaluation)
Sean Kennedy (Evaluation)
Thanks to the following people for patches and other suggestions for improvements:
Christophe Malabat, Pierre Lechat, Julien Tap, Anna Zhukova, Rachel Torchet
......@@ -27,18 +27,18 @@ system(command=paste('sed -i .bck -e "s/d3\\.min/d3/g" ', .libPaths(), '/d3heatm
#### replacement of the css cals of the rNVD3 ####
# get the rNVD3 path
rNVD3_path = paste(.libPaths(), 'rNVD3/nvd3/css/', sep='/')
#rNVD3_path = paste(.libPaths(), 'rNVD3/nvd3/css/', sep='/')
# get the path of the current source. may need to be modified (parent.frame(1) or parent.frame(2) or parent.frame(3) or else)
current_path = dirname(parent.frame(2)$ofile)
#current_path = dirname(parent.frame(2)$ofile)
# get the css files path
css_files = dir(path=current_path, pattern = "*.css$", full.names = T)
#css_files = dir(path=current_path, pattern = "*.css$", full.names = T)
# create the function to copy the css file
cp_to_rNVD3 = function(p, dest){
system(paste('cp', p, dest))
}
#cp_to_rNVD3 = function(p, dest){
# system(paste('cp', p, dest))
#}
#apply the copy to all the css files
sapply(css_files, cp_to_rNVD3, rNVD3_path)
#sapply(css_files, cp_to_rNVD3, rNVD3_path)
# first get d3heatmap javascript library path
scatterD3_path = paste(.libPaths(), 'scatterD3/htmlwidgets/', sep='/')
......
source('LoadPackages.R')
library(shiny)
renderDataTable <- DT::renderDataTable
dataTableOutput <- DT::dataTableOutput
......
source("css/owncss.R")
source("Rfunctions/Data_Management.R")
library(shinydashboard)
library(shinythemes)
library(shinyjs)
if(!require(shinydashboard)){
installed.packages("shinydashboard")
library(shinydashboard)
}
if(!require(shinythemes)){
install.packages("shinythemes")
library(shinythemes)
}
if(!require(shinyjs)){
install.packages("shinyjs")
library(shinyjs)
}
function(request) {
sidebar <- dashboardSidebar(
......@@ -19,6 +27,7 @@ sidebar <- dashboardSidebar(
sidebarMenu(
menuItem("Home", tabName = "Home", icon = icon("home")),
menuItem("Tutorial", tabName = "Tutorial", icon = icon("book")),
menuItem("Download/Install (beta)", tabName = "Download", icon = icon("download")),
menuItem("Upload your data", tabName = "Upload", icon = icon("upload")),
# bookmarkButton(),
menuItemOutput("dymMenu"),
......@@ -50,11 +59,12 @@ body <- dashboardBody(
tabPanel("About", tags$script(type="text/javascript", language="javascript", src="google-analytics.js"),
p("SHAMAN is a SHiny application for Metagenomic ANalysis including the normalization,
the differential analysis and mutiple visualization.",style = "font-family: 'times'; font-si16pt"),
p("SHAMAN is based on DESeq2 R package", a("[Anders and Huber 2010]", href="http://www.ncbi.nlm.nih.gov/pubmed/20979621"), "for the analysis of metagenomic data, as suggested in", a("[McMurdie and Holmes 2014]",href="http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3974642/"),
". SHAMAN robustly identifies the differential abundant genera with the Generalized Linear Model implemented in DESeq2", a("[Love 2014,", href="http://www.ncbi.nlm.nih.gov/pubmed/25516281"),a("Jonsson2016]",href="http://www.ncbi.nlm.nih.gov/pmc/articles/PMC4727335/"),".
p("SHAMAN is based on DESeq2 R package", a("[Anders and Huber 2010]", href="http://www.ncbi.nlm.nih.gov/pubmed/20979621"), "for the analysis of metagenomic data, as suggested in", a("[McMurdie and Holmes 2014,",href="http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3974642/"),a("Jonsson2016]",href="http://www.ncbi.nlm.nih.gov/pmc/articles/PMC4727335/"),
". SHAMAN robustly identifies the differential abundant genera with the Generalized Linear Model implemented in DESeq2", a("[Love 2014]", href="http://www.ncbi.nlm.nih.gov/pubmed/25516281"),".
Resulting p-values are adjusted according to the Benjamini and Hochberg procedure [Benjamini and Hochberg 1995].
The PCOA is performed with the", a("ade4 R package",href="http://pbil.univ-lyon1.fr/ade4/"), "and plots are generated with", a("ggplot2",href="http://ggplot2.org/"), "or", a("D3.js packages",href="http://d3js.org/"), ".
A presentation about SHAMAN is available", a("here.",target="_blank",href="shaman_presentation.pdf"),style = "font-family: 'times'; font-si16pt"),
A presentation about SHAMAN is available", a("here.",target="_blank",href="shaman_presentation.pdf"), br(),
"SHAMAN is compatible with standard formats for metagenomic analysis. We also provide a complete pipeline for OTU picking and annotation named",a("MASQUE", href="https://github.com/aghozlane/masque") ,"used in production at Institut Pasteur.",style = "font-family: 'times'; font-si16pt"),
p("Hereafter is the global workflow of the SHAMAN application:"),
div(img(src = "Workflow.png",width = "100%",style="max-width: 600px"),Align="center")
),
......@@ -78,6 +88,7 @@ body <- dashboardBody(
box(
title = "What's new in SHAMAN", width = NULL, status = "primary",
div(style = 'overflow-y: scroll; max-height: 400px',
addNews("Sep 14th 2016","Download and install SHAMAN","You can install SHAMAN (beta)."),
addNews("Sep 9th 2016","PCA/PCOA","You can select the axes for the PCOA and PCA plots."),
addNews("Aug 1st 2016","Biom format","SHAMAN can now support all the Biom format versions."),
addNews("Jun 24th 2016","Comparisons plots","The venn diagram and the heatmap of foldchange
......@@ -167,6 +178,26 @@ body <- dashboardBody(
))
),
tabItem(tabName = "Download",
fluidRow(
column(width=9,
div(style="width:100% ; max-width: 1200px",
tabBox(title="Download / Install SHAMAN", id="tabset1", width=NULL,
tabPanel("HOWTO", tags$script(type="text/javascript", language="javascript", src="google-analytics.js"),
p("SHAMAN is available for R>3.X. The installation, download and execution can all be performed with a small R script :",style = "font-family: 'times'; font-si16pt"),
wellPanel("# Load shiny packages",br(),
"if(!require('shiny')){",br()," install.packages('shiny')",br()," library(shiny)",br(),"}",br(),
br(),"# Install dependencies, download last version of SHAMAN from github and run shaman in one command :",br(),"runGitHub('aghozlane/shaman')"),
p("This script can also be dowloaded", a("here", target="_blank", href="shamanapp.R"), "and executed as following :"),
wellPanel("chmod +x ./shamanapp.R && Rscript ./shamanapp.R"),
p("Contribution to SHAMAN code are always welcome and can be performed with the", a("github deposit.",href="https://github.com/aghozlane/shaman"))
))
)
)
)
),
tabItem(tabName = "Upload",
tags$style(type='text/css', ".well { max-width: 20em; }"),
fluidRow(
......
"WT_0_6" "Delta_0_6" "DeltaCompl_0_6" "Delta_DeltaCompl_0_6" "WT_0_24" "Delta_0_24" "DeltaCompl_0_24" "Delta_DCompl_0_24" "Delta_WT_0_24" "Dcompl_WT_0_6" "Dcompl_WT_0_24"
0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0
-1 -1 -1 0 -1 -1 -1 0 0 0 0
1 1 1 0 0 0 0 0 0 0 0
0 0 0 0 1 1 1 0 0 0 0
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
0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0
0 -1 0 -1 -1 0 -1 0 -1 -1 0
0 0 -1 1 0 0 0 -1 1 0 0
-1 0 0 0 1 -1 0 0 0 1 0
0 1 0 1 1 0 0 0 0 0 0
0 0 1 -1 0 0 0 0 0 0 0
1 0 0 0 -1 0 0 0 0 0 0
0 0 0 0 0 0 1 0 1 1 0
0 0 0 0 0 0 0 1 -1 0 0
0 0 0 0 0 1 0 0 0 -1 0
"Name..." "Name....1" "Name..."
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment