Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ESB
ONT_pilot_gitlab
Commits
80dc8d9c
Commit
80dc8d9c
authored
Mar 08, 2021
by
Valentina Galata
Browse files
init: split link_input_files into LR/SR (better for updates, no effect on output)
parent
bb04dfe0
Changes
1
Hide whitespace changes
Inline
Side-by-side
workflow/rules/init.smk
View file @
80dc8d9c
...
...
@@ -41,27 +41,33 @@ READ_ASSEMBLER_PAIRS = assembler_pairs(READ_ASSEMBLERS)
BWA_IDX_EXT = ["amb", "ann", "bwt", "pac", "sa"]
# Set links to input files
localrules: link_input_files
localrules: link_input_files
_lr, link_input_files_sr
rule link_input_files:
rule link_input_files
_lr
:
output:
metag_lr=os.path.join(RESULTS_DIR, "preproc/metag/lr/lr.fastq.gz"),
metag_sr=expand(os.path.join(RESULTS_DIR, "input/metag/sr/{rid}.fq.gz"), rid={"R1", "R2"}),
metat_sr=expand(os.path.join(RESULTS_DIR, "input/metat/sr/{rid}.fq.gz"), rid={"R1", "R2"}) if "metat" in META_TYPES else []
metag_lr=os.path.join(RESULTS_DIR, "preproc/metag/lr/lr.fastq.gz")
message:
"Link input files"
"Link input files
: LR
"
run:
import os
from pathlib import Path
# metaG, FASTQ
ifname = os.path.abspath(config["data"]["metag"]["ont"]["fastq"])
ofname = os.path.join(RESULTS_DIR, "preproc/metag/lr/lr.fastq.gz")
os.symlink(os.path.abspath(ifname), ofname, target_is_directory=False)
rule link_input_files_sr:
output:
metag_sr=expand(os.path.join(RESULTS_DIR, "input/metag/sr/{rid}.fq.gz"), rid={"R1", "R2"}),
metat_sr=expand(os.path.join(RESULTS_DIR, "input/metat/sr/{rid}.fq.gz"), rid={"R1", "R2"}) if "metat" in META_TYPES else []
message:
"Link input files: SR"
run:
import os
from pathlib import Path
# metaG, SR
os.symlink(os.path.abspath(config["data"]["metag"]["sr"]["r1"]), os.path.join(RESULTS_DIR, "input/metag/sr/R1.fq.gz"), target_is_directory=False)
os.symlink(os.path.abspath(config["data"]["metag"]["sr"]["r2"]), os.path.join(RESULTS_DIR, "input/metag/sr/R2.fq.gz"), target_is_directory=False)
# metaT, SR
if "metat" in META_TYPES:
os.symlink(os.path.abspath(config["data"]["metat"]["sr"]["r1"]), os.path.join(RESULTS_DIR, "input/metat/sr/R1.fq.gz"), target_is_directory=False)
os.symlink(os.path.abspath(config["data"]["metat"]["sr"]["r2"]), os.path.join(RESULTS_DIR, "input/metat/sr/R2.fq.gz"), target_is_directory=False)
\ No newline at end of file
os.symlink(os.path.abspath(config["data"]["metat"]["sr"]["r2"]), os.path.join(RESULTS_DIR, "input/metat/sr/R2.fq.gz"), target_is_directory=False)
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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