Skip to content

Commit 47c581e

Browse files
committed
fix liftover
1 parent a686ce8 commit 47c581e

8 files changed

+5
-25
lines changed

v03_pipeline/lib/model/environment.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
# NB: using os.environ.get inside the dataclass defaults gives a lint error.
55
HAIL_TMPDIR = os.environ.get('HAIL_TMPDIR', '/tmp') # noqa: S108
66
HAIL_SEARCH_DATA = os.environ.get('HAIL_SEARCH_DATA', '/hail-search-data')
7+
LIFTOVER_REF_PATH = os.environ.get(
8+
'LIFTOVER_REF_PATH', 'gs://hail-common/references/grch38_to_grch37.over.chain.gz'
9+
)
710
LOADING_DATASETS = os.environ.get('LOADING_DATASETS', '/seqr-loading-temp')
811
PRIVATE_REFERENCE_DATASETS = os.environ.get(
912
'PRIVATE_REFERENCE_DATASETS',
@@ -34,6 +37,7 @@ class Env:
3437
ALLELE_REGISTRY_SECRET_NAME: str | None = ALLELE_REGISTRY_SECRET_NAME
3538
HAIL_TMPDIR: str = HAIL_TMPDIR
3639
HAIL_SEARCH_DATA: str = HAIL_SEARCH_DATA
40+
LIFTOVER_REF_PATH: str = LIFTOVER_REF_PATH
3741
LOADING_DATASETS: str = LOADING_DATASETS
3842
PRIVATE_REFERENCE_DATASETS: str = PRIVATE_REFERENCE_DATASETS
3943
PROJECT_ID: str | None = PROJECT_ID

v03_pipeline/lib/tasks/base/base_loading_run_params.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,3 @@ class BaseLoadingRunParams(luigi.Task):
3434
default=False,
3535
description='Is this a fully joint-called callset.',
3636
)
37-
liftover_ref_path = luigi.OptionalParameter(
38-
default='gs://hail-common/references/grch38_to_grch37.over.chain.gz',
39-
description='Path to GRCh38 to GRCh37 coordinates file',
40-
)

v03_pipeline/lib/tasks/update_lookup_table_test.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
)
88
from v03_pipeline.lib.test.mocked_dataroot_testcase import MockedDatarootTestCase
99

10-
TEST_LIFTOVER = 'v03_pipeline/var/test/liftover/grch38_to_grch37.over.chain.gz'
1110
TEST_VCF = 'v03_pipeline/var/test/callsets/1kg_30variants.vcf'
1211
TEST_REMAP = 'v03_pipeline/var/test/remaps/test_remap_1.tsv'
1312
TEST_PEDIGREE_3 = 'v03_pipeline/var/test/pedigrees/test_pedigree_3.tsv'
@@ -28,7 +27,6 @@ def test_skip_update_lookup_table_task(self) -> None:
2827
project_pedigree_paths=[TEST_PEDIGREE_3],
2928
skip_validation=True,
3029
skip_check_sex_and_relatedness=True,
31-
liftover_ref_path=TEST_LIFTOVER,
3230
)
3331
worker.add(uslt_task)
3432
worker.run()
@@ -61,7 +59,6 @@ def test_update_lookup_table_task(self) -> None:
6159
project_pedigree_paths=[TEST_PEDIGREE_3],
6260
skip_validation=True,
6361
skip_check_sex_and_relatedness=True,
64-
liftover_ref_path=TEST_LIFTOVER,
6562
)
6663
worker.add(uslt_task)
6764
worker.run()

v03_pipeline/lib/tasks/update_project_table_test.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
from v03_pipeline.lib.tasks.update_project_table import UpdateProjectTableTask
66
from v03_pipeline.lib.test.mocked_dataroot_testcase import MockedDatarootTestCase
77

8-
TEST_LIFTOVER = 'v03_pipeline/var/test/liftover/grch38_to_grch37.over.chain.gz'
98
TEST_VCF = 'v03_pipeline/var/test/callsets/1kg_30variants.vcf'
109
TEST_REMAP = 'v03_pipeline/var/test/remaps/test_remap_1.tsv'
1110
TEST_PEDIGREE_3 = 'v03_pipeline/var/test/pedigrees/test_pedigree_3.tsv'
@@ -24,7 +23,6 @@ def test_update_project_table_task(self) -> None:
2423
project_pedigree_path=TEST_PEDIGREE_3,
2524
skip_validation=True,
2625
skip_check_sex_and_relatedness=True,
27-
liftover_ref_path=TEST_LIFTOVER,
2826
)
2927
worker.add(upt_task)
3028
worker.run()

v03_pipeline/lib/tasks/update_variant_annotations_table_with_new_samples_test.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
from v03_pipeline.lib.test.mocked_dataroot_testcase import MockedDatarootTestCase
4444
from v03_pipeline.var.test.vep.mock_vep_data import MOCK_37_VEP_DATA, MOCK_38_VEP_DATA
4545

46-
TEST_LIFTOVER = 'v03_pipeline/var/test/liftover/grch38_to_grch37.over.chain.gz'
4746
TEST_MITO_MT = 'v03_pipeline/var/test/callsets/mito_1.mt'
4847
TEST_SNV_INDEL_VCF = 'v03_pipeline/var/test/callsets/1kg_30variants.vcf'
4948
TEST_SV_VCF = 'v03_pipeline/var/test/callsets/sv_1.vcf'
@@ -163,7 +162,6 @@ def test_missing_pedigree(
163162
project_guids=['R0113_test_project'],
164163
project_remap_paths=[TEST_REMAP],
165164
project_pedigree_paths=['bad_pedigree'],
166-
liftover_ref_path=TEST_LIFTOVER,
167165
skip_validation=True,
168166
skip_check_sex_and_relatedness=True,
169167
run_id=TEST_RUN_ID,
@@ -198,7 +196,6 @@ def test_missing_interval_reference(
198196
project_guids=['R0113_test_project'],
199197
project_remap_paths=[TEST_REMAP],
200198
project_pedigree_paths=[TEST_PEDIGREE_3],
201-
liftover_ref_path=TEST_LIFTOVER,
202199
skip_validation=True,
203200
skip_check_sex_and_relatedness=True,
204201
run_id=TEST_RUN_ID,
@@ -368,7 +365,6 @@ def test_multiple_update_vat(
368365
project_guids=['R0113_test_project'],
369366
project_remap_paths=[TEST_REMAP],
370367
project_pedigree_paths=[TEST_PEDIGREE_3],
371-
liftover_ref_path=TEST_LIFTOVER,
372368
skip_validation=False,
373369
skip_check_sex_and_relatedness=True,
374370
run_id=TEST_RUN_ID,
@@ -421,7 +417,6 @@ def test_multiple_update_vat(
421417
project_guids=['R0114_project4'],
422418
project_remap_paths=[TEST_REMAP],
423419
project_pedigree_paths=[TEST_PEDIGREE_4],
424-
liftover_ref_path=TEST_LIFTOVER,
425420
skip_validation=False,
426421
skip_check_sex_and_relatedness=True,
427422
run_id=TEST_RUN_ID,
@@ -693,7 +688,6 @@ def test_update_vat_grch37(
693688
project_guids=['R0113_test_project'],
694689
project_remap_paths=[TEST_REMAP],
695690
project_pedigree_paths=[TEST_PEDIGREE_3],
696-
liftover_ref_path=TEST_LIFTOVER,
697691
skip_validation=True,
698692
skip_check_sex_and_relatedness=True,
699693
run_id=TEST_RUN_ID,
@@ -774,7 +768,6 @@ def test_update_vat_without_accessing_private_datasets(
774768
project_guids=['R0113_test_project'],
775769
project_remap_paths=[TEST_REMAP],
776770
project_pedigree_paths=[TEST_PEDIGREE_3],
777-
liftover_ref_path=TEST_LIFTOVER,
778771
skip_validation=True,
779772
skip_check_sex_and_relatedness=True,
780773
run_id=TEST_RUN_ID,
@@ -833,7 +826,6 @@ def test_mito_update_vat(
833826
project_guids=['R0115_test_project2'],
834827
project_remap_paths=['not_a_real_file'],
835828
project_pedigree_paths=[TEST_PEDIGREE_5],
836-
liftover_ref_path=TEST_LIFTOVER,
837829
skip_validation=True,
838830
skip_check_sex_and_relatedness=True,
839831
run_id=TEST_RUN_ID,
@@ -1099,7 +1091,6 @@ def test_sv_update_vat(
10991091
project_guids=['R0115_test_project2'],
11001092
project_remap_paths=['not_a_real_file'],
11011093
project_pedigree_paths=[TEST_PEDIGREE_5],
1102-
liftover_ref_path=TEST_LIFTOVER,
11031094
skip_validation=True,
11041095
skip_check_sex_and_relatedness=True,
11051096
run_id=TEST_RUN_ID,
@@ -1662,7 +1653,6 @@ def test_gcnv_update_vat(
16621653
project_guids=['R0115_test_project2'],
16631654
project_remap_paths=['not_a_real_file'],
16641655
project_pedigree_paths=[TEST_PEDIGREE_5],
1665-
liftover_ref_path=TEST_LIFTOVER,
16661656
skip_validation=True,
16671657
skip_check_sex_and_relatedness=True,
16681658
run_id=TEST_RUN_ID,

v03_pipeline/lib/tasks/write_family_table_test.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
from v03_pipeline.lib.tasks.write_family_table import WriteFamilyTableTask
66
from v03_pipeline.lib.test.mocked_dataroot_testcase import MockedDatarootTestCase
77

8-
TEST_LIFTOVER = 'v03_pipeline/var/test/liftover/grch38_to_grch37.over.chain.gz'
98
TEST_GCNV_BED_FILE = 'v03_pipeline/var/test/callsets/gcnv_1.tsv'
109
TEST_SNV_INDEL_VCF = 'v03_pipeline/var/test/callsets/1kg_30variants.vcf'
1110
TEST_SV_VCF = 'v03_pipeline/var/test/callsets/sv_1.vcf'
@@ -28,7 +27,6 @@ def test_snv_write_family_table_task(self) -> None:
2827
family_guid='abc_1',
2928
skip_validation=True,
3029
skip_check_sex_and_relatedness=True,
31-
liftover_ref_path=TEST_LIFTOVER,
3230
)
3331
worker.add(wft_task)
3432
worker.run()
@@ -167,7 +165,6 @@ def test_sv_write_family_table_task(self) -> None:
167165
family_guid='family_2_1',
168166
skip_validation=True,
169167
skip_check_sex_and_relatedness=True,
170-
liftover_ref_path=TEST_LIFTOVER,
171168
)
172169
worker.add(write_family_table_task)
173170
worker.run()
@@ -421,7 +418,6 @@ def test_gcnv_write_family_table_task(self) -> None:
421418
family_guid='family_2_1',
422419
skip_validation=True,
423420
skip_check_sex_and_relatedness=True,
424-
liftover_ref_path=TEST_LIFTOVER,
425421
)
426422
worker.add(write_family_table_task)
427423
worker.run()

v03_pipeline/lib/tasks/write_new_variants_table.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ def annotation_dependencies(self) -> dict[str, hl.Table]:
6262
deps['gencode_gene_symbol_to_gene_id_mapping'] = hl.literal(
6363
load_gencode_gene_symbol_to_gene_id(GENCODE_RELEASE, ''),
6464
)
65+
deps['liftover_ref_path'] = Env.LIFTOVER_REF_PATH
6566
return deps
6667

6768
def output(self) -> luigi.Target:

v03_pipeline/lib/tasks/write_project_family_tables_test.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
)
88
from v03_pipeline.lib.test.mocked_dataroot_testcase import MockedDatarootTestCase
99

10-
TEST_LIFTOVER = 'v03_pipeline/var/test/liftover/grch38_to_grch37.over.chain.gz'
1110
TEST_SNV_INDEL_VCF = 'v03_pipeline/var/test/callsets/1kg_30variants.vcf'
1211
TEST_REMAP = 'v03_pipeline/var/test/remaps/test_remap_1.tsv'
1312
TEST_PEDIGREE_4 = 'v03_pipeline/var/test/pedigrees/test_pedigree_4.tsv'
@@ -26,7 +25,6 @@ def test_snv_write_project_family_tables_task(self) -> None:
2625
project_pedigree_path=TEST_PEDIGREE_4,
2726
skip_validation=True,
2827
skip_check_sex_and_relatedness=True,
29-
liftover_ref_path=TEST_LIFTOVER,
3028
)
3129
worker.add(write_project_family_tables)
3230
worker.run()

0 commit comments

Comments
 (0)