Skip to content

Commit 27c6bd8

Browse files
committed
Change parameters again
1 parent ac83cd0 commit 27c6bd8

11 files changed

+21
-37
lines changed

v03_pipeline/lib/model/environment.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
ACCESS_PRIVATE_REFERENCE_DATASETS = (
2525
os.environ.get('ACCESS_PRIVATE_REFERENCE_DATASETS') == '1'
2626
)
27-
EXPECT_WES_FILTERS = os.environ.get('EXPECT_WES_FILTERS') == '1'
2827
REFERENCE_DATA_AUTO_UPDATE = os.environ.get('REFERENCE_DATA_AUTO_UPDATE') == '1'
2928
SHOULD_REGISTER_ALLELES = os.environ.get('SHOULD_REGISTER_ALLELES') == '1'
3029

@@ -33,7 +32,6 @@
3332
class Env:
3433
ACCESS_PRIVATE_REFERENCE_DATASETS: bool = ACCESS_PRIVATE_REFERENCE_DATASETS
3534
ALLELE_REGISTRY_SECRET_NAME: str | None = ALLELE_REGISTRY_SECRET_NAME
36-
EXPECT_WES_FILTERS: bool = EXPECT_WES_FILTERS
3735
HAIL_TMPDIR: str = HAIL_TMPDIR
3836
HAIL_SEARCH_DATA: str = HAIL_SEARCH_DATA
3937
LOADING_DATASETS: str = LOADING_DATASETS

v03_pipeline/lib/tasks/base/base_loading_run_params.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,20 @@ class BaseLoadingRunParams(luigi.Task):
1414
default=False,
1515
parsing=luigi.BoolParameter.EXPLICIT_PARSING,
1616
)
17-
validate = luigi.BoolParameter(
17+
force = luigi.BoolParameter(
18+
default=False,
19+
parsing=luigi.BoolParameter.EXPLICIT_PARSING,
20+
)
21+
skip_check_sex_and_relatedness = luigi.BoolParameter(
1822
default=True,
1923
parsing=luigi.BoolParameter.EXPLICIT_PARSING,
2024
)
21-
force = luigi.BoolParameter(
22-
default=False,
25+
skip_expect_filters = luigi.BoolParameter(
26+
default=True,
2327
parsing=luigi.BoolParameter.EXPLICIT_PARSING,
2428
)
25-
check_sex_and_relatedness = luigi.BoolParameter(
26-
default=False,
29+
skip_validation = luigi.BoolParameter(
30+
default=True,
2731
parsing=luigi.BoolParameter.EXPLICIT_PARSING,
2832
)
2933
is_new_gcnv_joint_call = luigi.BoolParameter(

v03_pipeline/lib/tasks/update_lookup_table_test.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ def test_skip_update_lookup_table_task(self) -> None:
2626
], # a project excluded from the lookup table
2727
project_remap_paths=[TEST_REMAP],
2828
project_pedigree_paths=[TEST_PEDIGREE_3],
29-
validate=False,
3029
liftover_ref_path=TEST_LIFTOVER,
3130
)
3231
worker.add(uslt_task)
@@ -58,7 +57,6 @@ def test_update_lookup_table_task(self) -> None:
5857
project_guids=['R0113_test_project'],
5958
project_remap_paths=[TEST_REMAP],
6059
project_pedigree_paths=[TEST_PEDIGREE_3],
61-
validate=False,
6260
liftover_ref_path=TEST_LIFTOVER,
6361
)
6462
worker.add(uslt_task)

v03_pipeline/lib/tasks/update_project_table_test.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ def test_update_project_table_task(self) -> None:
2222
project_guid='R0113_test_project',
2323
project_remap_path=TEST_REMAP,
2424
project_pedigree_path=TEST_PEDIGREE_3,
25-
validate=False,
2625
liftover_ref_path=TEST_LIFTOVER,
2726
)
2827
worker.add(upt_task)

v03_pipeline/lib/tasks/update_variant_annotations_table_with_new_samples_test.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@ def test_missing_pedigree(
163163
project_guids=['R0113_test_project'],
164164
project_remap_paths=[TEST_REMAP],
165165
project_pedigree_paths=['bad_pedigree'],
166-
validate=False,
167166
liftover_ref_path=TEST_LIFTOVER,
168167
run_id=TEST_RUN_ID,
169168
)
@@ -197,7 +196,6 @@ def test_missing_interval_reference(
197196
project_guids=['R0113_test_project'],
198197
project_remap_paths=[TEST_REMAP],
199198
project_pedigree_paths=[TEST_PEDIGREE_3],
200-
validate=False,
201199
liftover_ref_path=TEST_LIFTOVER,
202200
run_id=TEST_RUN_ID,
203201
)
@@ -366,7 +364,7 @@ def test_multiple_update_vat(
366364
project_guids=['R0113_test_project'],
367365
project_remap_paths=[TEST_REMAP],
368366
project_pedigree_paths=[TEST_PEDIGREE_3],
369-
validate=True,
367+
skip_validation=False,
370368
liftover_ref_path=TEST_LIFTOVER,
371369
run_id=TEST_RUN_ID,
372370
)
@@ -418,7 +416,7 @@ def test_multiple_update_vat(
418416
project_guids=['R0114_project4'],
419417
project_remap_paths=[TEST_REMAP],
420418
project_pedigree_paths=[TEST_PEDIGREE_4],
421-
validate=True,
419+
skip_validation=False,
422420
liftover_ref_path=TEST_LIFTOVER,
423421
run_id=TEST_RUN_ID,
424422
)
@@ -689,7 +687,6 @@ def test_update_vat_grch37(
689687
project_guids=['R0113_test_project'],
690688
project_remap_paths=[TEST_REMAP],
691689
project_pedigree_paths=[TEST_PEDIGREE_3],
692-
validate=False,
693690
liftover_ref_path=TEST_LIFTOVER,
694691
run_id=TEST_RUN_ID,
695692
)
@@ -769,7 +766,6 @@ def test_update_vat_without_accessing_private_datasets(
769766
project_guids=['R0113_test_project'],
770767
project_remap_paths=[TEST_REMAP],
771768
project_pedigree_paths=[TEST_PEDIGREE_3],
772-
validate=False,
773769
liftover_ref_path=TEST_LIFTOVER,
774770
run_id=TEST_RUN_ID,
775771
)
@@ -827,7 +823,6 @@ def test_mito_update_vat(
827823
project_guids=['R0115_test_project2'],
828824
project_remap_paths=['not_a_real_file'],
829825
project_pedigree_paths=[TEST_PEDIGREE_5],
830-
validate=False,
831826
liftover_ref_path=TEST_LIFTOVER,
832827
run_id=TEST_RUN_ID,
833828
)
@@ -1092,7 +1087,6 @@ def test_sv_update_vat(
10921087
project_guids=['R0115_test_project2'],
10931088
project_remap_paths=['not_a_real_file'],
10941089
project_pedigree_paths=[TEST_PEDIGREE_5],
1095-
validate=False,
10961090
liftover_ref_path=TEST_LIFTOVER,
10971091
run_id=TEST_RUN_ID,
10981092
)
@@ -1654,7 +1648,6 @@ def test_gcnv_update_vat(
16541648
project_guids=['R0115_test_project2'],
16551649
project_remap_paths=['not_a_real_file'],
16561650
project_pedigree_paths=[TEST_PEDIGREE_5],
1657-
validate=False,
16581651
liftover_ref_path=TEST_LIFTOVER,
16591652
run_id=TEST_RUN_ID,
16601653
)

v03_pipeline/lib/tasks/write_family_table_test.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ def test_snv_write_family_table_task(self) -> None:
2626
project_remap_path=TEST_REMAP,
2727
project_pedigree_path=TEST_PEDIGREE_3,
2828
family_guid='abc_1',
29-
validate=False,
3029
liftover_ref_path=TEST_LIFTOVER,
3130
)
3231
worker.add(wft_task)
@@ -164,7 +163,6 @@ def test_sv_write_family_table_task(self) -> None:
164163
project_remap_path='not_a_real_file',
165164
project_pedigree_path=TEST_PEDIGREE_5,
166165
family_guid='family_2_1',
167-
validate=False,
168166
liftover_ref_path=TEST_LIFTOVER,
169167
)
170168
worker.add(write_family_table_task)
@@ -417,7 +415,6 @@ def test_gcnv_write_family_table_task(self) -> None:
417415
project_remap_path='not_a_real_file',
418416
project_pedigree_path=TEST_PEDIGREE_5,
419417
family_guid='family_2_1',
420-
validate=False,
421418
liftover_ref_path=TEST_LIFTOVER,
422419
)
423420
worker.add(write_family_table_task)

v03_pipeline/lib/tasks/write_imported_callset.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def output(self) -> luigi.Target:
5454

5555
def requires(self) -> list[luigi.Task]:
5656
requirements = []
57-
if Env.EXPECT_WES_FILTERS and self.dataset_type.expect_filters(
57+
if not self.skip_expect_filters and self.dataset_type.expect_filters(
5858
self.sample_type,
5959
):
6060
requirements = [
@@ -67,7 +67,7 @@ def requires(self) -> list[luigi.Task]:
6767
),
6868
),
6969
]
70-
if self.validate and self.dataset_type.can_run_validation:
70+
if not self.skip_validation and self.dataset_type.can_run_validation:
7171
requirements = [
7272
*requirements,
7373
(
@@ -86,7 +86,7 @@ def requires(self) -> list[luigi.Task]:
8686
),
8787
]
8888
if (
89-
self.check_sex_and_relatedness
89+
not self.skip_check_sex_and_relatedness
9090
and self.dataset_type.check_sex_and_relatedness
9191
):
9292
requirements = [
@@ -102,7 +102,7 @@ def additional_row_fields(self, mt):
102102
return {
103103
**(
104104
{'info.AF': hl.tarray(hl.tfloat64)}
105-
if self.check_sex_and_relatedness
105+
if not self.skip_check_sex_and_relatedness
106106
and self.dataset_type.check_sex_and_relatedness
107107
else {}
108108
),
@@ -154,7 +154,7 @@ def create_table(self) -> hl.MatrixTable:
154154
mt.locus.contig,
155155
),
156156
)
157-
if self.validate and self.dataset_type.can_run_validation:
157+
if not self.skip_validation and self.dataset_type.can_run_validation:
158158
validate_allele_type(mt)
159159
validate_no_duplicate_variants(mt)
160160
validate_expected_contig_frequency(mt, self.reference_genome)
@@ -172,7 +172,7 @@ def create_table(self) -> hl.MatrixTable:
172172
self.sample_type,
173173
)
174174
if (
175-
self.check_sex_and_relatedness
175+
not self.skip_check_sex_and_relatedness
176176
and self.dataset_type.check_sex_and_relatedness
177177
):
178178
sex_check_ht = hl.read_table(

v03_pipeline/lib/tasks/write_metadata_for_run_test.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ def test_write_metadata_for_run_task(self) -> None:
2323
project_guids=['R0113_test_project', 'R0114_project4'],
2424
project_remap_paths=[TEST_REMAP_2, TEST_REMAP_2],
2525
project_pedigree_paths=[TEST_PEDIGREE_3, TEST_PEDIGREE_4],
26-
validate=False,
27-
check_sex_and_relatedness=False,
2826
run_id='run_123456',
2927
)
3028
worker.add(write_metadata_for_run_task)

v03_pipeline/lib/tasks/write_project_family_tables_test.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ def test_snv_write_project_family_tables_task(self) -> None:
2424
project_guid='R0113_test_project',
2525
project_remap_path=TEST_REMAP,
2626
project_pedigree_path=TEST_PEDIGREE_4,
27-
validate=False,
2827
liftover_ref_path=TEST_LIFTOVER,
2928
)
3029
worker.add(write_project_family_tables)

v03_pipeline/lib/tasks/write_remapped_and_subsetted_callset.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def requires(self) -> list[luigi.Task]:
5353
RawFileTask(self.project_pedigree_path),
5454
]
5555
if (
56-
self.check_sex_and_relatedness
56+
not self.skip_check_sex_and_relatedness
5757
and self.dataset_type.check_sex_and_relatedness
5858
):
5959
requirements = [
@@ -88,7 +88,7 @@ def create_table(self) -> hl.MatrixTable:
8888
families_failed_relatedness_check = {}
8989
families_failed_sex_check = {}
9090
if (
91-
self.check_sex_and_relatedness
91+
not self.skip_check_sex_and_relatedness
9292
and self.dataset_type.check_sex_and_relatedness
9393
):
9494
relatedness_check_ht = hl.read_table(self.input()[2].path)

0 commit comments

Comments
 (0)