Skip to content

Commit 9a6f955

Browse files
committed
reuse orca rule
1 parent 43242ae commit 9a6f955

File tree

1 file changed

+2
-48
lines changed

1 file changed

+2
-48
lines changed

workflow/rules/raw.smk

+2-48
Original file line numberDiff line numberDiff line change
@@ -48,60 +48,14 @@ rule build_raw_orca:
4848
"{params.ro_input} {output}"
4949

5050

51-
rule build_raw_orca_bz2:
52-
"""
53-
This rule runs build_raw, it takes in a file.{daq_ext} and outputs a raw file
54-
"""
51+
use rule build_raw_orca as build_raw_orca_bz2 with:
5552
input:
5653
get_pattern_tier_daq(config, extension="orca.bz2"),
57-
params:
58-
timestamp="{timestamp}",
59-
datatype="{datatype}",
60-
ro_input=lambda _, input: ro(input),
61-
output:
62-
get_pattern_tier(config, "raw", check_in_cycle=check_in_cycle),
63-
log:
64-
get_pattern_log(config, "tier_raw", time),
65-
group:
66-
"tier-raw"
67-
resources:
68-
mem_swap=110,
69-
runtime=300,
70-
shell:
71-
execenv_pyexe(config, "build-tier-raw-orca") + "--log {log} "
72-
f"--configs {ro(configs)} "
73-
f"--chan-maps {ro(chan_maps)} "
74-
"--datatype {params.datatype} "
75-
"--timestamp {params.timestamp} "
76-
"{params.ro_input} {output}"
7754

7855

79-
rule build_raw_orca_gzip:
80-
"""
81-
This rule runs build_raw, it takes in a file.{daq_ext} and outputs a raw file
82-
"""
56+
use rule build_raw_orca as build_raw_orca_gz with:
8357
input:
8458
get_pattern_tier_daq(config, extension="orca.gz"),
85-
params:
86-
timestamp="{timestamp}",
87-
datatype="{datatype}",
88-
ro_input=lambda _, input: ro(input),
89-
output:
90-
get_pattern_tier(config, "raw", check_in_cycle=check_in_cycle),
91-
log:
92-
get_pattern_log(config, "tier_raw", time),
93-
group:
94-
"tier-raw"
95-
resources:
96-
mem_swap=110,
97-
runtime=300,
98-
shell:
99-
execenv_pyexe(config, "build-tier-raw-orca") + "--log {log} "
100-
f"--configs {ro(configs)} "
101-
f"--chan-maps {ro(chan_maps)} "
102-
"--datatype {params.datatype} "
103-
"--timestamp {params.timestamp} "
104-
"{params.ro_input} {output}"
10559

10660

10761
rule build_raw_fcio:

0 commit comments

Comments
 (0)