En raison du déménagement des baies serveurs, les services gitlab.irstea.fr et mattermost.irstea.fr seront interrompus le samedi 2 octobre 2021 au matin. Ils devraient revenir à la normale dans la journée.

Commit be5578e2 authored by Midoux Cedric's avatar Midoux Cedric
Browse files

conda migale

parent 2293e9d4
......@@ -11,6 +11,7 @@ snakemake \
--cluster-config cluster.json \
--cluster "qsub -V -cwd -N {rule} -o {cluster.out} -e {cluster.err} -q {cluster.queue} -pe thread {threads} {cluster.cluster}" \
--keep-going \
--restart-times 5 \
--jobs 80 \
--wait-for-files \
--latency-wait 150 \
......
rule blastn:
rule addAffi:
input:
biom = "work/dada/dada.biom",
fasta = "work/dada/seqtab.fasta"
output:
blast = "work/BLAST/seqtab.fasta.blast"
biom = "work/FROGS/affiliation.biom",
html = "work/FROGS/affiliation.html",
log = "work/FROGS/affiliation.log"
threads:
config["THREADS"]
params:
database = config["DATABASE"]
shell:
"blastn "
"-num_threads {threads} "
"-task megablast "
"-word_size 38 "
"-max_target_seqs 500 "
"-outfmt '6 qseqid sseqid pident length mismatch gapopen qstart qend sstart send evalue bitscore qlen' "
"-query {input.fasta} "
"-out {output.blast} "
"-db {params.database} "
rule addAffi:
input:
biom = "work/dada/dada.biom",
fasta = "work/dada/seqtab.fasta",
blast = "work/BLAST/seqtab.fasta.blast"
output:
biom = "work/FROGS/affiliation.biom"
params:
database = config["DATABASE"]
shell:
"addAffiliation2biom.py "
"conda activate frogs-3.2.0 "
"&& "
"affiliation_OTU.py "
"--input-fasta {input.fasta} "
"--input-biom {input.biom} "
"--nb-cpu {threads} "
"--log-file {output.log} "
"--output-biom {output.biom} "
"--summary {output.html} "
"--reference {params.database} "
"--blast-file {input.blast} "
"--biom-in {input.biom} "
"--biom-out {output.biom} "
"&& "
"conda deactivate"
rule stats:
input:
......@@ -41,10 +31,12 @@ rule stats:
html_cluster = "work/FROGS/clusters_metrics.html",
html_affiliations = "work/FROGS/affiliations_metrics.html"
shell:
"conda activate frogs-3.2.0 "
"&& "
"clusters_stat.py "
"--input-biom {input.biom} "
"--output-file {output.html_cluster}"
" ; "
"&& "
"affiliations_stat.py "
"--input-biom {input.biom} "
"--output-file {output.html_affiliations} "
......@@ -54,6 +46,8 @@ rule stats:
"--tax-consensus-tag blast_taxonomy "
"--identity-tag perc_identity "
"--coverage-tag perc_query_coverage"
"&& "
"conda deactivate"
rule tree:
input:
......@@ -65,12 +59,16 @@ rule tree:
threads:
config["THREADS"]
shell:
"/projet/galaxyprod/galaxy/tools/FROGS/app/tree.py "
"conda activate frogs-3.2.0 "
"&& "
"tree.py "
"--nb-cpus {threads} "
"--input-otu {input.fasta} "
"--biomfile {input.biom} "
"--html {output.html} "
"--out-tree {output.nwk}"
"&& "
"conda deactivate"
rule stdBIOM:
input:
......@@ -79,11 +77,16 @@ rule stdBIOM:
biom = "work/FROGS/abundance.biom",
tsv = "work/FROGS/multihits.tsv"
shell:
"conda activate frogs-3.2.0 "
"&& "
"biom_to_stdBiom.py "
"--input-biom {input.biom} "
"--output-biom {output.biom} "
"--output-metadata {output.tsv}"
"&& "
"conda deactivate"
localrules: copy
rule copy:
input:
"work/FROGS/{file}"
......
shell.executable("/bin/bash")
shell.prefix("source /usr/local/genome/Anaconda2-5.1.0/etc/profile.d/conda.sh;")
configfile: "./config.json"
SAMPLES=config["SAMPLES"]
......
......@@ -7,6 +7,8 @@ rule cutadapt:
five = lambda wildcards: config["FIVE_PRIMER"][wildcards.sample],
three = lambda wildcards: config["THREE_PRIMER"][wildcards.sample]
shell:
"conda activate cutadapt-2.5 "
"&& "
"cutadapt "
"-g {params.five} "
"-a {params.three} "
......@@ -15,6 +17,8 @@ rule cutadapt:
"--match-read-wildcards "
"-o {output} "
"{input} "
"&& "
"conda deactivate"
rule filter:
input:
......
......@@ -7,10 +7,14 @@ rule fastqc:
params:
output = "work/fastqc/"
shell:
"conda activate fastqc-0.11.8 "
"&& "
"fastqc "
"{input} "
"--noextract "
"--outdir {params.output} "
"&& "
"conda deactivate "
rule multiqc:
input:
......@@ -20,7 +24,11 @@ rule multiqc:
params:
output = "report/"
shell:
"conda activate multiqc-1.8 "
"&& "
"multiqc "
"--no-data-dir "
"--outdir {params.output} "
"{input} "
"&& "
"conda deactivate "
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