Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ONT_pilot_gitlab
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ESB
ONT_pilot_gitlab
Commits
edb020ee
Commit
edb020ee
authored
4 years ago
by
Valentina Galata
Browse files
Options
Downloads
Patches
Plain Diff
setup rules: minor changes; operams setup (issue
#43
)
parent
03fdf14e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
workflow/rules/setup.smk
+26
-22
26 additions, 22 deletions
workflow/rules/setup.smk
with
26 additions
and
22 deletions
workflow/rules/setup.smk
+
26
−
22
View file @
edb020ee
...
...
@@ -3,8 +3,7 @@ rule install_casc:
output:
os.path.join(MOD_DIR, "casc/bin/casc")
log:
out="logs/casc_install.out.log",
err="logs/casc_install.err.log"
"logs/setup.casc.log"
params:
path=os.path.join(MOD_DIR, "casc")
conda:
...
...
@@ -12,19 +11,14 @@ rule install_casc:
message:
"Setup: install CASC"
shell:
"(cd {params.path} && "
"perl Makefile.PL PREFIX=\"$(realpath .)\" && "
"make && "
"make test && "
"make install) 2> {log.err} > {log.out}"
"(cd {params.path} && perl Makefile.PL PREFIX=\"$(realpath .)\" && make && make test && make install) &> {log}"
# MinCED
rule install_minced:
output:
os.path.join(MOD_DIR, "minced/minced.jar")
log:
out="logs/minced_install.out.log",
err="logs/minced_install.err.log"
"logs/setup.minced.log"
params:
path=os.path.join(MOD_DIR, "minced")
conda:
...
...
@@ -32,9 +26,22 @@ rule install_minced:
message:
"Setup: install MinCED"
shell:
"(cd {params.path} && "
"make && "
"make test) 2> {log.err} > {log.out}"
"(cd {params.path} && make && make test) &> {log}"
# OPERA-MS
rule install_operams:
output:
os.path.join(MOD_DIR, "operams/OPERA-MS.pl")
log:
"logs/setup.operams.log"
params:
path=os.path.join(MOD_DIR, "operams")
conda:
os.path.join(ENV_DIR, "operams.yaml")
message:
"Setup: install OPERA-MS"
shell:
"(cd ${params.path} && make && perl utils/install_perl_module.pl && perl OPERA-MS.pl check-dependency) &> {log}"
# Download RGI data
rule download_rgi_db:
...
...
@@ -42,8 +49,7 @@ rule download_rgi_db:
archive=temp(os.path.join(DB_DIR, "rgi/card-data.tar.bz2")),
json=os.path.join(DB_DIR, "rgi/card.json")
log:
out="logs/rgi_db.out.log",
err="logs/rgi_db.err.log"
"logs/setup.rgi.db.log"
params:
db_url=config["rgi"]["db_url"]
message:
...
...
@@ -52,7 +58,7 @@ rule download_rgi_db:
"(date && "
"wget -O {output.archive} {params.db_url} --no-check-certificate && "
"tar -C $(dirname {output.archive}) -xvf {output.archive} && "
"date)
2> {log.err}
> {log
.out
}"
"date)
&
> {log}"
# Setup RGI: load required DB
# NOTE: to make sure that the same DB is used for all targets
...
...
@@ -62,23 +68,21 @@ rule setup_rgi_db:
output:
"status/rgi_setup.done"
log:
out="logs/rgi_setup.out.log",
err="logs/rgi_setup.err.log"
"logs/setup.rgi.setup.log"
conda:
os.path.join(ENV_DIR, "rgi.yaml")
message:
"Setup: load RGI DB"
shell:
"(rgi clean --local && "
"rgi load --card_json {input} --local && "
"rgi database --version --local) 2> {log.err} > {log.out} && "
"touch {output}"
"(rgi clean --local && rgi load --card_json {input} --local && rgi database --version --local) &> {log} && touch {output}"
# Reference genome FASTA for bbmap to remove host contamination
rule setup_bbmap_host_ref:
output:
os.path.join(DB_DIR, "{bname}.fasta")
log:
"logs/setup.bbmap.hostref.log"
params:
url=lambda wildcards, output: config["bbmap"]["host_refs"][wildcards.bname]
shell:
"wget -O {output}.gz {params.url} && gzip -d {output}.gz"
"
(
wget -O {output}.gz {params.url} && gzip -d {output}.gz
) &> {log}
"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment