Commit 00aae418 authored by Yoann Dufresne's avatar Yoann Dufresne
Browse files

d2 eval update

parent 4a3ba830
......@@ -3,29 +3,29 @@ include: "Snakefile_d2"
include: "Snakefile_d2_path"
WORKDIR = "snake_experiments" if "workdir" not in config else config["workdir"]
N = [1000]
N = [5000, 10000]
D = [10]
M = [2]
DEV = [0]
M = [2, 3]
DEV = [0, 1]
rule generate_compare:
input:
f"{WORKDIR}/eval_compare.tsv"
f"{WORKDIR}/eval_compare_raw.tsv"
rule comparable_tsv:
input:
d2_evals = expand(f"{WORKDIR}/simu_0_bar_n{{n}}_d{{d}}_m{{m}}-dev{{dev}}_d2_simplified_maxclq_eval_d2.txt", m=M, d=D, n=N, dev=DEV),
path_evals = expand(f"{WORKDIR}/simu_0_bar_n{{n}}_d{{d}}_m{{m}}-dev{{dev}}_d2_simplified_maxclq_eval_path.txt", m=M, d=D, n=N, dev=DEV)
d2_evals = expand(f"{WORKDIR}" + "/simu_0_bar_n{n}_d{d}_m{m}-dev{dev}_d2_{{type}}_maxclq_eval_d2.txt", m=M, d=D, n=N, dev=DEV),
path_evals = expand(f"{WORKDIR}" + "/simu_0_bar_n{n}_d{d}_m{m}-dev{dev}_d2_{{type}}_maxclq_eval_path.txt", m=M, d=D, n=N, dev=DEV)
output:
f"{WORKDIR}/eval_compare.tsv"
f"{WORKDIR}/eval_compare_{{type}}.tsv"
run:
with open(str(output), "w") as out:
for n in N:
for d in D:
for m in M:
for dev in DEV:
with open(f"{WORKDIR}/simu_0_bar_n{n}_d{d}_m{m}-dev{dev}_d2_simplified_maxclq_eval_d2.txt") as f_d2,\
open(f"{WORKDIR}/simu_0_bar_n{n}_d{d}_m{m}-dev{dev}_d2_simplified_maxclq_eval_path.txt") as d_path:
with open(f"{WORKDIR}/simu_0_bar_n{n}_d{d}_m{m}-dev{dev}_d2_{wildcards.type}_maxclq_eval_d2.txt") as f_d2,\
open(f"{WORKDIR}/simu_0_bar_n{n}_d{d}_m{m}-dev{dev}_d2_{wildcards.type}_maxclq_eval_path.txt") as d_path:
longest_path_d2 = f_d2.readlines()[8].strip().split(': ')[-1]
path_eval_lines = d_path.readlines()
greedy_path = path_eval_lines[-1].strip().split(' ')[-1]
......@@ -34,17 +34,17 @@ rule comparable_tsv:
rule eval_d2:
input:
"{file}_d2_simplified_maxclq.gexf"
"{file}_d2_{type}_maxclq.gexf"
output:
"{file}_d2_simplified_maxclq_eval_d2.txt"
"{file}_d2_{type}_maxclq_eval_d2.txt"
shell:
"python3 deconvolution/main/evaluate.py -t d2 {input} > {output}"
rule eval_path:
input:
barcode="{barcode_file}.gexf",
path="{barcode_file}_d2_simplified_maxclq_path.gexf"
path="{barcode_file}_d2_{type}_maxclq_path.gexf"
output:
"{barcode_file}_d2_simplified_maxclq_eval_path.txt"
"{barcode_file}_d2_{type}_maxclq_eval_path.txt"
shell:
"python3 deconvolution/main/evaluate.py --type path {input.path} -l -b {input.barcode} > {output}"
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