Commit bf33067f authored by khalid's avatar khalid
Browse files

Add a bunch of phyloseq stats

parent b96eba60
rule <step_name>__FROGS_phyloseq_stats:
input:
**<step_name>__FROGS_phyloseq_stats_inputs(),
output:
log: config["results_dir"]+'/logs/' + config["<step_name>__FROGS_phyloseq_stats_output_dir"] + '/FROGS_phyloseq_stats_log.txt',
params:
command = config["<step_name>__FROGS_phyloseq_stats_command"],
outDir = config["results_dir"]+'/'+config["<step_name>__FROGS_phyloseq_stats_output_dir"],
varExp = config["<step_name>__FROGS_phyloseq_stats_varExp"],
shell: """
cd {params.outDir};
{params.command}/tree.py -i {input.otu_sequence_file} -b {input.biom_file};
{params.command}/phyloseq_import_data.py -b {input.biom_file} -s {input.popmap_file} -t tree.nwk ;
{params.command}/phyloseq_composition.py -r phyloseq_data.Rdata -r1 Kingdom -s1 Bacteria -r2 Phylum -n 20 -v {params.varExp} ;
{params.command}/phyloseq_alpha_diversity.py -r phyloseq_data.Rdata -m Observed Chao1 Shannon InvSimpson -v {params.varExp};
{params.command}/phyloseq_beta_diversity.py -r phyloseq_data.Rdata -v time -m bray,cc,unifrac,wunifrac --matrix-outdir . ;
{params.command}/phyloseq_structure.py -r phyloseq_data.Rdata -v {params.varExp} -d jaccard.tsv;
{params.command}/phyloseq_clustering.py -r phyloseq_data.Rdata -v {params.varExp} -d jaccard.tsv;
{params.command}/phyloseq_manova.py -r phyloseq_data.Rdata -v {params.varExp} -m jaccard.tsv;
"""
\ No newline at end of file
{
id: FROGS_phyloseq_stats,
name: FROGS phyloseq_stats,
article: 10.1093/bib/bbab318,
website: "http://frogs.toulouse.inrae.fr/",
git: "https://github.com/geraldinepascal/FROGS",
description: "Phyloseq to analyse abundance, diversity and structure",
version: "3.2.3",
documentation: "http://frogs.toulouse.inrae.fr/html/commands_utax.html",
multiqc: "custom",
commands:
[
{
name: FROGS_phyloseq_stats_SE,
cname: FROGS_phyloseq_stats_SE,
command: "/opt/biotools/FROGS-3.2.3/app",
category: "FROGS",
output_dir: FROGS_phyloseq_stats_SE,
inputs:
[
{ name: "biom_file", type: "biom", description: "The biom file contains the OTU's informations: abundance and taxonomy." },
{ name: "otu_sequence_file", type: "fasta_file", description: "OTU sequences in fasta format" },
{ name: popmap_file, type: "popmap", file: "", description: "Path to tsv file with metatdata of samples conditions"},
],
outputs:
[
{ name: "alpha_div", file: "phyloseq_alpha_diversity.tsv.tsv", type: "tsv", description: "detailed alpha diversity indices in each sample"},
{ name: "wunifrac_div", file: "wunifrac.tsv", type: "tsv", description: "wunifrac distance matrix between samples"},
],
options:
[
{
name: "varExp",
type: "text",
prefix: "--varExp",
value: "",
description: "The experiment variable that you want to analyse (column name in metadata file)."
}
],
},
],
install:
{
perl: [
"sudo apt-get install python3 perl" # deja installé
],
mafft: [
"cd /opt/biotools/",
"wget https://mafft.cbrc.jp/alignment/software/mafft_7.471-1_amd64.deb",
"dpkg -i mafft_7.471-1_amd64.deb",
"rm mafft_7.471-1_amd64.deb"
],
FastTree: [
"cd /opt/biotools",
"mkdir Fasttree && cd Fasttree",
"wget http://www.microbesonline.org/fasttree/FastTree # this may change the version!",
"chmod 777 FastTree",
],
frogs: [
"cd /opt/biotools",
"wget https://github.com/geraldinepascal/FROGS/archive/v3.2.3.tar.gz",
"tar -zxvf v3.2.3.tar.gz",
"cd FROGS-3.2.3",
"mkdir bin"
],
post_frogs_install: [
"mafftbin=$(which mafft)",
"ln -s $mafftbin /opt/biotools/FROGS-3.2.3/libexec/.",
"ln -s /opt/biotools/Fasttree/FastTree /opt/biotools/FROGS-3.2.3/libexec/."
],
phyloseq: [
"Rscript -e 'library(\"devtools\");devtools::install_github(\"joey711/phyloseq\");)'"
],
plotly: [ "Rscript -e 'install.packages(\"plotly\")' "],
phangorn: ["Rscript -e 'install.packages(\"phangorn\", dependencies = TRUE)' "],
others: ["Rscript -e 'install.packages( c(\"optparse\",\"calibrate\",\"formattable\")) '"],
mbb_mqc_plugin:
[
"cd /opt/biotools",
"git clone https://gitlab.mbb.univ-montp2.fr/mmassaviol/mbb_mqc_plugin.git",
"cd mbb_mqc_plugin",
"python3 setup.py install"
],
pandoc: [apt-get install -y pandoc],
},
citations: {
frogs: [
" Maria Bernard, Olivier Rué, Mahendra Mariadassou and Géraldine Pascal; FROGS: a powerful tool to analyse the diversity of fungi with special management of internal transcribed spacers, Briefings in Bioinformatics 2021, 10.1093/bib/bbab318 "
],
phyloseq: [
"McMurdie and Holmes (2013) phyloseq: An R package for reproducible interactive analysis and graphics of microbiome census data PLoS ONE 8(4):e61217"
],
}
}
Markdown is supported
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