Commit 455f6e88 authored by Yoann Dufresne's avatar Yoann Dufresne
Browse files

update snakefile for evaluate d2 graphs

parent c3537900
......@@ -13,7 +13,7 @@ INPUT = INPUT if isinstance(INPUT, list) else [INPUT]
SAMPLE_NAME = [name[name.rfind('/')+1:name.rfind('.')] for name in INPUT]
rule all:
rule final_d2_files:
input:
expand(f"{WORKDIR}/{{name}}{final_output_suffix}", name=SAMPLE_NAME)
......@@ -22,8 +22,6 @@ rule compress_data:
barcode_graph=f"{WORKDIR}/{{barcode_file}}.gexf",
d2_raw=f"{WORKDIR}/{{barcode_file}}_d2_raw_maxclq.gexf",
simplified_d2=f"{WORKDIR}/{{barcode_file}}_d2_simplified_maxclq.gexf"
# d2_raw_louvain=f"{WORKDIR}/{{barcode_file}}_d2_raw_louvain.gexf",
# simplified_d2_louvain=f"{WORKDIR}/{{barcode_file}}_d2_simplified_louvain.gexf"
output:
zip=f"{WORKDIR}/{{barcode_file}}.tar.gz"
shell:
......
include: "Snakefile_data_simu"
include: "Snakefile_d2"
WORKDIR = "snake_experiments" if "workdir" not in config else config["workdir"]
N = [5000, 10000]
D = [10]
M = [2, 3]
DEV = [0, 1]
rule eval_finalization:
input:
expand(f"{WORKDIR}/simu_0_bar_n{{n}}_d{{d}}_m{{m}}-dev{{dev}}_d2_simplified_maxclq_eval.txt", m=M, d=D, n=N, dev=DEV)
rule eval:
input:
"{file}_d2_simplified_maxclq.gexf"
output:
"{file}_d2_simplified_maxclq_eval.txt"
shell:
"python3 deconvolution/main/evaluate.py -t d2 {input} > {output}"
OUTDIR="snake_exec" if "outdir" not in config else config["outdir"]
WORKDIR="snake_exec" if "outdir" not in config else config["outdir"]
N=[10000] if "n" not in config else config["n"] # Number of molecule to simulate
D=[5] if "d" not in config else config["d"] # Average coverage of each molecule
M=[2] if "m" not in config else config["m"] # Average number of molecule per barcode
M_DEV=[0] if "m_dev" not in config else config["m_dev"] # Std deviation for merging number
# snake_experiments/simu_0_bar_n500_d5_m2.gexf
rule all:
input:
expand(f"{OUTDIR}/simu_bar_n{{n}}_d{{d}}_m{{m}}-dev{{md}}.gexf", n=N, m=M, d=D, md=M_DEV)
expand(f"{WORKDIR}/simu_bar_n{{n}}_d{{d}}_m{{m}}-dev{{md}}.gexf", n=N, m=M, d=D, md=M_DEV)
rule generate_barcodes:
rule generate_barcodes_with_dev:
input:
"{path}/simu_mol_{params}.gexf"
output:
"{path}/simu_bar_{params}_m{m}-dev{md}.gexf"
"{path}/simu{name}_bar_{params}_m{m}-dev{md}.gexf"
wildcard_constraints:
m="[0-9]+"
shell:
"python3 deconvolution/main/generate_fake_barcode_graph.py --merging_depth {wildcards.m} --deviation {wildcards.md} --input_graph {input} --output {output}"
# snake_experiments/simu_0_bar_n500_d5_m2_d2_raw_maxclq.gexf
rule generate_barcodes_without_dev:
input:
"{path}/simu_mol_{params}.gexf"
output:
"{path}/simu{name}_bar_{params}_m{m}.gexf"
wildcard_constraints:
m="[0-9]+"
shell:
"python3 deconvolution/main/generate_fake_barcode_graph.py --merging_depth {wildcards.m} --input_graph {input} --output {output}"
rule generate_molecules:
output:
"{path}/simu_mol_n{n}_d{d}.gexf"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment