Skip to content

Commit 32a314e

Browse files
committed
feat(data-pipelines): add step to remove v4 gene constraint
1 parent 2117c7f commit 32a314e

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

data-pipeline/src/data_pipeline/datasets/gnomad_v4/gnomad_v4_constraint.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,9 @@ def prepare_gnomad_v4_constraint(path):
4343
ds = ds.key_by("transcript_id")
4444

4545
return ds
46+
47+
48+
def remove_gnomad_v4_constraint(genes_path):
49+
ds = hl.read_table(path)
50+
ds = ds.drop("gnomad_constraint")
51+
return ds

data-pipeline/src/data_pipeline/pipelines/genes.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@
2727
)
2828
from data_pipeline.data_types.gene import reject_par_y_genes
2929

30-
from data_pipeline.datasets.gnomad_v4.gnomad_v4_constraint import prepare_gnomad_v4_constraint
30+
from data_pipeline.datasets.gnomad_v4.gnomad_v4_constraint import (
31+
prepare_gnomad_v4_constraint,
32+
remove_gnomad_v4_constraint,
33+
)
3134

3235
pipeline = Pipeline()
3336

@@ -373,6 +376,15 @@ def annotate_with_constraint(genes_path, constraint_path):
373376
},
374377
)
375378

379+
pipeline.add_task(
380+
"remove_constraint_for_release",
381+
remove_gnomad_v4_constraint,
382+
f"/{genes_subdir}/genes_grch38_annotate_5_no_constraint",
383+
{
384+
"genes_path": pipeline.get_task("annotate_grch38_genes_step_5"),
385+
},
386+
)
387+
376388
###############################################
377389
# Extract transcripts
378390
###############################################

0 commit comments

Comments
 (0)