Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Yoann DUFRESNE
linked reads molecule ordering
Commits
5ff927fa
Commit
5ff927fa
authored
Nov 14, 2019
by
Yoann Dufresne
Browse files
d2 generation Snakefile
parent
396f4d19
Changes
2
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
5ff927fa
...
...
@@ -3,3 +3,4 @@ art/
**/__pycache__/
.pytest_cache/
.idea/
.snakemake/
Snakefile
0 → 100644
View file @
5ff927fa
WORKDIR = "snake_tests"
DATA = "data"
rule all:
input:
f"{WORKDIR}/small_bar.tar.gz"
rule compress_data:
input:
barcode_graph=f"{WORKDIR}/{{barcode_file}}.gexf",
d2_raw=f"{WORKDIR}/{{barcode_file}}_d2_raw.gexf",
simplified_d2=f"{WORKDIR}/{{barcode_file}}_d2_simplified.gexf"
output:
zip=f"{WORKDIR}/{{barcode_file}}.tar.gz"
shell:
f"mkdir {WORKDIR}/{{wildcards.barcode_file}};"
f"mv {WORKDIR}/*.gexf {WORKDIR}/{{wildcards.barcode_file}}/ ;"
f"tar czf {{output.zip}} {WORKDIR}/{{wildcards.barcode_file}}/ ;"
f"rm -rf {WORKDIR}/{{wildcards.barcode_file}}/ ;"
rule d2_simplification:
input:
barcode_graph="{barcode_path}.gexf",
d2_raw="{barcode_path}_d2_raw.gexf"
output:
simplified_d2="{barcode_path}_d2_simplified.gexf"
shell:
"python3 deconvolution/d2_reduction.py -o {output.simplified_d2} {input.barcode_graph} {input.d2_raw}"
rule d2_generation:
input:
barcode_graph=f"{WORKDIR}/{{file}}.gexf"
output:
d2_file=f"{WORKDIR}/{{file}}_d2_raw.gexf"
shell:
f"python3 deconvolution/to_d2_graph.py {{input.barcode_graph}} -o {WORKDIR}/{{wildcards.file}}_d2_raw"
rule setup_workdir:
input:
barcode_graph=f"{DATA}/{{file}}.gexf"
output:
f"{WORKDIR}/{{file}}.gexf"
shell:
f"if [ ! -d {WORKDIR} ]; then mkdir {WORKDIR}; fi;"
f"cp {{input.barcode_graph}} {WORKDIR}"
Write
Preview
Supports
Markdown
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