Skip to content

Commit

Permalink
add config_indels
Browse files Browse the repository at this point in the history
  • Loading branch information
LaraFuhrmann committed Aug 24, 2023
1 parent 23d3be7 commit 795a365
Showing 1 changed file with 58 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ def load_config(path):
config = load_configfile(path)
return config

module indels:
snakefile:
"../../../workflow/Snakefile"
config:
load_config("config_indels/config.yaml")
replace_prefix:
{"results/": "results/indels/", "resources/": "resources/indels/"}

use rule * from indels as indels_*


module varyvilocaparams:
snakefile:
Expand Down Expand Up @@ -52,6 +62,54 @@ rule all:
default_target: True


# indels rules
use rule run_method_local from indels as indels_run_method_local_global with:
output:
fname_result_haplos=f"results/indels/method_runs/{indels.paramspace.wildcard_pattern}/{{method}}/replicates/{{replicate}}/haplotypes_.fasta",
fname_result=f"results/indels/method_runs/{indels.paramspace.wildcard_pattern}/{{method}}/replicates/{{replicate}}/snvs_.vcf",
dname_work=directory(
f"results/indels/method_runs/{indels.paramspace.wildcard_pattern}/{{method}}/replicates/{{replicate}}/work/"
),
fname_status=touch(
f"results/indels/method_runs/{indels.paramspace.wildcard_pattern}/{{method,{'|'.join(['markertoavoidemptyregex'] + indels.method_list)}}}/replicates/{{replicate}}/status_.txt"
),
params:
script_path=lambda wildcards, input: input.script,
benchmark:
f"results/indels/method_runs/{indels.paramspace.wildcard_pattern}/{{method,{'|'.join(['markertoavoidemptyregex'] + indels.method_list)}}}/replicates/{{replicate}}/benchmark_.tsv"
resources:
mem_mb=20024,
runtime=240,
threads=10,


use rule performance_measures_local from indels as indels_performance_measures_local with:
input:
vcf_list=[
f"results/indels/method_runs/{params}/{method}/replicates/{replicate}/snvs_.vcf"
for params in indels.paramspace.instance_patterns
for method in indels.method_list
for replicate in range(indels.config["replicate_count"])
],
# we also include `method_list_local` to align with `vcf_list`
groundtruth_list=[
f"results/indels/simulated_reads/{params}/replicates/{replicate}/ground_truth.csv"
for params in indels.paramspace.instance_patterns
for method in indels.method_list
for replicate in range(indels.config["replicate_count"])
],
benchmark_list=[
f"results/indels/method_runs/{params}/{method}/replicates/{replicate}/benchmark_.tsv"
for params in indels.paramspace.instance_patterns
for method in indels.method_list
for replicate in range(indels.config["replicate_count"])
],
haplostats_list=[
f"results/indels/haplo_stats/{params}/replicates/{replicate}/haplotypes_stats.csv"
for params in indels.paramspace.instance_patterns
for replicate in range(indels.config["replicate_count"])
],

# distance rules
use rule run_method_local from varyvilocaparams as varyvilocaparams_run_method_local_global with:
output:
Expand Down

0 comments on commit 795a365

Please sign in to comment.