Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Cedric Midoux
deepomics16S
Commits
be5578e2
Commit
be5578e2
authored
Jan 29, 2021
by
Cedric Midoux
Browse files
conda migale
parent
2293e9d4
Changes
5
Hide whitespace changes
Inline
Side-by-side
RunSnake.sh
View file @
be5578e2
...
...
@@ -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
\
...
...
affiliation.smk
View file @
be5578e2
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}"
...
...
global.smk
View file @
be5578e2
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"]
...
...
preprocess.smk
View file @
be5578e2
rule cutadapt:
input:
"DATA/{sample}.fastq.gz"
output:
"work/cutadapt/{sample}.fastq.gz"
params:
five = lambda wildcards: config["FIVE_PRIMER"][wildcards.sample],
three = lambda wildcards: config["THREE_PRIMER"][wildcards.sample]
shell:
"cutadapt "
"-g {params.five} "
"-a {params.three} "
"--error-rate 0.1 "
"--discard-untrimmed "
"--match-read-wildcards "
"-o {output} "
"{input} "
input:
"DATA/{sample}.fastq.gz"
output:
"work/cutadapt/{sample}.fastq.gz"
params:
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} "
"--error-rate 0.1 "
"--discard-untrimmed "
"--match-read-wildcards "
"-o {output} "
"{input} "
"&& "
"conda deactivate"
rule filter:
input:
...
...
quality.smk
View file @
be5578e2
...
...
@@ -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 "
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment