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