Skip to content
Snippets Groups Projects
Commit ab685564 authored by Valentina Galata's avatar Valentina Galata
Browse files

updated input preparation rules

parent 5feedaab
No related branches found
No related tags found
1 merge request!76Merge "cleanup" branch with "master" branch
......@@ -46,25 +46,16 @@ INPUT_SR = config["data"]["sr"]
INPUT_METAT = config["data"]["metat"]
# Data from input
DATA_FAST5 = [os.path.join(RESULTS_DIR, "input", os.path.basename(f)) for f in INPUT_FAST5]
DATA_FAST5 = [os.path.join(RESULTS_DIR, "input_ont", os.path.basename(f)) for f in INPUT_FAST5]
assert len(DATA_FAST5) == len(set(DATA_FAST5)), "Created link names for FAST5 files are NOT unique: {}".format(DATA_FAST5)
# DATA_SR = [os.path.join(RESULTS_DIR, "input", os.path.basename(f)) for f in INPUT_SR]
# assert len(DATA_SR) == len(set(DATA_SR)), "Created link names for SR files are NOT unique: {}".format(DATA_FAST5)
# # Input
# BARCODES = config["barcodes"]
# RUNS = [
# config["runs"]["first"],
# config["runs"]["second"],
# # config["runs"]["third"]
# ]
# SAMPLES = config["samples"]
# BINNING_SAMPLES = config["binning_samples"]
# # References
# IGC_URI = config["igc"]["uri"]
# HG38_URI = config["hg38"]["uri"]
# REFERENCES = ["igc", "hg38"]
DATA_SR = {
"r1": os.path.join(RESULTS_DIR, "input_sr", os.path.basename(INPUT_SR["r1"])),
"r2": os.path.join(RESULTS_DIR, "input_sr", os.path.basename(INPUT_SR["r2"]))
}
DATA_METAT = {
"r1": os.path.join(RESULTS_DIR, "input_metat", os.path.basename(INPUT_METAT["r1"])),
"r2": os.path.join(RESULTS_DIR, "input_metat", os.path.basename(INPUT_METAT["r2"]))
}
# # Tools
# ASSEMBLERS = config["assemblers"]
......
......@@ -4,12 +4,13 @@ localrules: link_input_files
rule link_input_files:
input:
INPUT_FAST5 #+ INPUT_SR + INPUT_METAT
INPUT_FAST5 + list(INPUT_SR.values()) + list(INPUT_METAT.values())
output:
DATA_FAST5 #+ DATA_SR + DATA_METAT
DATA_FAST5 + list(DATA_SR.values()) + list(DATA_METAT.values())
message:
"Link input files"
run:
assert len(input) == len(output), "Input and output lists have different length"
for ifname, ofname in zip(input, output):
os.symlink(ifname, ofname, target_is_directory=False)
\ No newline at end of file
# print("{} ==> {}".format(ifname, ofname))
os.symlink(os.path.abspath(ifname), ofname, target_is_directory=False)
......@@ -5,7 +5,7 @@ include:
rule PREPARE_INPUT:
input:
DATA_FAST5 #+ DATA_SR + DATA_METAT
DATA_FAST5 + list(DATA_SR.values()) + list(DATA_METAT.values())
output:
"status/prepare_input.done"
shell:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment