Skip to content

Commit 4ca1499

Browse files
committed
fixup: pr comments -- keep mane select version in globals
1 parent 4bab3c2 commit 4ca1499

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

data-pipeline/src/data_pipeline/data_types/gene.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,11 @@ def import_hgnc(path):
226226
return ds
227227

228228

229-
def prepare_table_for_release(genes_path):
229+
def prepare_table_for_release(genes_path, keep_mane_version_global_annotation):
230230
ds = hl.import_table(genes_path)
231+
if keep_mane_version_global_annotation:
232+
globals_dict = ds.index_globals()
233+
ds = ds.select_globals(mane_select_version=globals_dict["annotations"]["mane_select_transcript"]["version"])
231234
ds = ds.select_globals()
232235
return ds
233236

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@ def annotate_with_preferred_transcript(table_path):
328328
f"/{genes_subdir}/genes_grch37_public_release.ht",
329329
{
330330
"genes_path": pipeline.get_task("annotate_grch37_genes_step_5"),
331+
"keep_mane_version_global_annotation": False,
331332
},
332333
)
333334

@@ -401,6 +402,7 @@ def annotate_with_constraint(genes_path, constraint_path):
401402
f"/{genes_subdir}/genes_grch38_public_release.ht",
402403
{
403404
"genes_path": pipeline.get_task("remove_constraint_for_release"),
405+
"keep_mane_version_global_annotation": True,
404406
},
405407
)
406408

0 commit comments

Comments
 (0)