Skip to content

Commit 274c253

Browse files
fmt
1 parent f5bf5a3 commit 274c253

File tree

5 files changed

+17
-12
lines changed

5 files changed

+17
-12
lines changed

workflow/Snakefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
configfile: "config/config.yaml"
22

3+
34
include: "rules/common.smk"
45
include: "rules/processing.smk"
56
include: "rules/plotting.smk"
67
include: "rules/datavzrd.smk"
78
include: "rules/testing.smk"
89

910

10-
report:
11-
"report/workflow.rst"
11+
report: "report/workflow.rst"
1212

1313

1414
rule all:
@@ -27,4 +27,4 @@ rule all:
2727
collect(
2828
"results/datavzrd/{dataset}",
2929
dataset=config["datasets"],
30-
)
30+
),

workflow/rules/common.smk

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ def get_value_column(wildcards):
66
data_path = lookup(f"datasets/{dataset}/data", within=config)
77
with open(data_path) as f:
88
header = f.readline().strip().split("\t")
9-
col_idx = lookup(f"datasets/{dataset}/value_column_index", within=config, default=None)
9+
col_idx = lookup(
10+
f"datasets/{dataset}/value_column_index", within=config, default=None
11+
)
1012
if col_idx is not None:
1113
return header[col_idx]
1214
elif len(header) == n_vars + 1:
@@ -18,4 +20,4 @@ def get_value_column(wildcards):
1820
"file contains exactly #variables + 1 columns."
1921
)
2022
else:
21-
return definition
23+
return definition

workflow/rules/datavzrd.smk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ rule parquet_to_tsv:
22
input:
33
"{prefix}.parquet",
44
output:
5-
"{prefix}.tsv"
5+
"{prefix}.tsv",
66
log:
7-
"logs/parquet_to_tsv/{prefix}.log"
7+
"logs/parquet_to_tsv/{prefix}.log",
88
conda:
99
"../envs/pystats.yaml"
1010
script:
@@ -25,9 +25,9 @@ rule datavzrd_report:
2525
"dataset": "{dataset}",
2626
},
2727
caption="../report/datavzrd.rst",
28-
)
28+
),
2929
log:
30-
"logs/datavzrd_report/{dataset}.log"
30+
"logs/datavzrd_report/{dataset}.log",
3131
params:
3232
value_column=get_value_column,
3333
variables=lookup("datasets/{dataset}/variables", within=config),

workflow/rules/plotting.smk

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ rule plot_dists_and_effects:
2424
input:
2525
cis="results/bootstrap/confidence_intervals/{dataset}.parquet",
2626
data="results/data/{dataset}.sorted.parquet",
27-
comparisons=local(lookup("datasets/{dataset}/comparisons", within=config, default=[])),
27+
comparisons=local(
28+
lookup("datasets/{dataset}/comparisons", within=config, default=[])
29+
),
2830
output:
2931
report(
3032
"results/plots/{dataset}/distributions_{mode,all|selected}_legend_{legend,yes|no}_effects.html",

workflow/rules/testing.smk

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ for test_name, test in tests.items():
1414

1515
rule all_tests:
1616
input:
17-
"results/tests.tsv"
17+
"results/tests.tsv",
18+
1819

1920
rule simulate_data:
2021
output:
@@ -45,4 +46,4 @@ rule validate_results:
4546
conda:
4647
"../envs/simulation.yaml"
4748
script:
48-
"../scripts/validate_results.py"
49+
"../scripts/validate_results.py"

0 commit comments

Comments
 (0)