Skip to content

Commit 36126a0

Browse files
committed
fix: adjusted to new clumping step
1 parent f837d3c commit 36126a0

File tree

1 file changed

+23
-8
lines changed

1 file changed

+23
-8
lines changed

src/airflow/dags/finngen_preprocess.py

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@
1111
AUTOSCALING = "finngen-preprocess"
1212

1313
RELEASEBUCKET = "gs://genetics_etl_python_playground/output/python_etl/parquet/XX.XX"
14+
SUMSTATS = "{RELEASEBUCKET}/summary_statistics/finngen"
15+
WINDOWBASED_CLUMPED = (
16+
"{RELEASEBUCKET}/study_locus/from_sumstats_study_locus_window_clumped/finngen"
17+
)
18+
LD_CLUMPED = "{RELEASEBUCKET}/study_locus/from_sumstats_study_locus_ld_clumped/finngen"
19+
PICSED = "{RELEASEBUCKET}/credible_set/from_sumstats_study_locus/finngen"
1420

1521
with DAG(
1622
dag_id=Path(__file__).stem,
@@ -24,15 +30,23 @@
2430
task_id="finngen_sumstats_and_study_index",
2531
)
2632

27-
clumping = common.submit_step(
33+
window_based_clumping = common.submit_step(
2834
cluster_name=CLUSTER_NAME,
2935
step_id="clump",
30-
task_id="finngen_clump",
36+
task_id="finngen_window_based_clumping",
3137
other_args=[
32-
f"step.summary_stats_path={RELEASEBUCKET}/summary_statistics/finngen",
33-
f"step.clumped_study_locus_out={RELEASEBUCKET}/study_locus/from_sumstats_study_locus/finngen",
38+
"step.input_path={SUMSTATS}",
39+
"step.clumped_study_locus_path={WINDOWBASED_CLUMPED}",
40+
],
41+
)
42+
ld_clumping = common.submit_step(
43+
cluster_name=CLUSTER_NAME,
44+
step_id="clump",
45+
task_id="finngen_ld_clumping",
46+
other_args=[
47+
"step.input_path={WINDOWBASED_CLUMPED}",
48+
"step.clumped_study_locus_path={LD_CLUMPED}",
3449
],
35-
# This allows to attempt running the task when above step fails do to failifexists
3650
trigger_rule=TriggerRule.ALL_DONE,
3751
)
3852

@@ -41,8 +55,8 @@
4155
step_id="pics",
4256
task_id="finngen_pics",
4357
other_args=[
44-
f"step.study_locus_ld_annotated_in={RELEASEBUCKET}/study_locus/from_sumstats_study_locus/finngen",
45-
f"step.picsed_study_locus_out={RELEASEBUCKET}/credible_set/from_sumstats_study_locus/finngen",
58+
f"step.study_locus_ld_annotated_in={LD_CLUMPED}",
59+
f"step.picsed_study_locus_out={PICSED}",
4660
],
4761
# This allows to attempt running the task when above step fails do to failifexists
4862
trigger_rule=TriggerRule.ALL_DONE,
@@ -52,7 +66,8 @@
5266
common.create_cluster(CLUSTER_NAME, autoscaling_policy=AUTOSCALING)
5367
>> common.install_dependencies(CLUSTER_NAME)
5468
>> study_and_sumstats
55-
>> clumping
69+
>> window_based_clumping
70+
>> ld_clumping
5671
>> pics
5772
>> common.delete_cluster(CLUSTER_NAME)
5873
)

0 commit comments

Comments
 (0)