Skip to content

Commit e019eb4

Browse files
authored
make run id a shared parameter (necessary for validation work) (#901)
* make run id shared * A fix * another test * A few more * Few more * Unnecessary * ruf * run id * string * unused * missed one * Fix it correctly * missed one * Last one!
1 parent 39b67c7 commit e019eb4

9 files changed

+12
-6
lines changed

.github/workflows/unit-tests.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ jobs:
3636
run: ruff . --output-format github
3737
- name: Unit Tests
3838
run: |
39-
export HAIL_TMP_DIR=/tmp
4039
export GRCH37_TO_GRCH38_LIFTOVER_REF_PATH=v03_pipeline/var/test/liftover/grch37_to_grch38.over.chain.gz
4140
export GRCH38_TO_GRCH37_LIFTOVER_REF_PATH=v03_pipeline/var/test/liftover/grch38_to_grch37.over.chain.gz
4241
export ACCESS_PRIVATE_REFERENCE_DATASETS=1

v03_pipeline/lib/tasks/base/base_loading_run_params.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ class BaseLoadingRunParams(luigi.Task):
1616
# - The "Loading Pipeline" params are shared with
1717
# tasks that may remove data from or change the
1818
# structure of the persisted Hail Tables.
19+
run_id = luigi.Parameter()
1920
sample_type = luigi.EnumParameter(enum=SampleType)
2021
callset_path = luigi.Parameter()
2122
ignore_missing_samples_when_remapping = luigi.BoolParameter(

v03_pipeline/lib/tasks/update_lookup_table.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ class UpdateLookupTableTask(BaseUpdateLookupTableTask):
2424
project_guids = luigi.ListParameter()
2525
project_remap_paths = luigi.ListParameter()
2626
project_pedigree_paths = luigi.ListParameter()
27-
run_id = luigi.Parameter()
2827

2928
def complete(self) -> bool:
3029
return super().complete() and hl.eval(

v03_pipeline/lib/tasks/update_project_table_test.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,16 @@
1313
'v03_pipeline/var/test/pedigrees/test_pedigree_3_different_families.tsv'
1414
)
1515

16+
TEST_RUN_ID = 'manual__2024-04-03'
17+
1618

1719
class UpdateProjectTableTaskTest(MockedDatarootTestCase):
1820
def test_update_project_table_task(self) -> None:
1921
worker = luigi.worker.Worker()
2022
upt_task = UpdateProjectTableTask(
2123
reference_genome=ReferenceGenome.GRCh38,
2224
dataset_type=DatasetType.SNV_INDEL,
25+
run_id=TEST_RUN_ID,
2326
sample_type=SampleType.WGS,
2427
callset_path=TEST_VCF,
2528
project_guid='R0113_test_project',
@@ -128,6 +131,7 @@ def test_update_project_table_task_different_pedigree(self) -> None:
128131
upt_task = UpdateProjectTableTask(
129132
reference_genome=ReferenceGenome.GRCh38,
130133
dataset_type=DatasetType.SNV_INDEL,
134+
run_id=TEST_RUN_ID,
131135
sample_type=SampleType.WGS,
132136
callset_path=TEST_VCF,
133137
project_guid='R0113_test_project',
@@ -140,6 +144,7 @@ def test_update_project_table_task_different_pedigree(self) -> None:
140144
upt_task = UpdateProjectTableTask(
141145
reference_genome=ReferenceGenome.GRCh38,
142146
dataset_type=DatasetType.SNV_INDEL,
147+
run_id=TEST_RUN_ID,
143148
sample_type=SampleType.WGS,
144149
callset_path=TEST_VCF,
145150
project_guid='R0113_test_project',

v03_pipeline/lib/tasks/update_variant_annotations_table_with_new_samples.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ class UpdateVariantAnnotationsTableWithNewSamplesTask(
2323
project_guids = luigi.ListParameter()
2424
project_remap_paths = luigi.ListParameter()
2525
project_pedigree_paths = luigi.ListParameter()
26-
run_id = luigi.Parameter()
2726

2827
def requires(self) -> list[luigi.Task]:
2928
return [

v03_pipeline/lib/tasks/write_metadata_for_run.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ class WriteMetadataForRunTask(luigi.Task):
1717
project_guids = luigi.ListParameter()
1818
project_remap_paths = luigi.ListParameter()
1919
project_pedigree_paths = luigi.ListParameter()
20-
run_id = luigi.Parameter()
2120

2221
def output(self) -> luigi.Target:
2322
return GCSorLocalTarget(

v03_pipeline/lib/tasks/write_new_variants_table.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ class WriteNewVariantsTableTask(BaseWriteTask):
4848
project_guids = luigi.ListParameter()
4949
project_remap_paths = luigi.ListParameter()
5050
project_pedigree_paths = luigi.ListParameter()
51-
run_id = luigi.Parameter()
5251

5352
@property
5453
def annotation_dependencies(self) -> dict[str, hl.Table]:

v03_pipeline/lib/tasks/write_project_family_tables_test.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,16 @@
1313
TEST_PEDIGREE_4 = 'v03_pipeline/var/test/pedigrees/test_pedigree_4.tsv'
1414
TEST_PEDIGREE_4_SUBSET = 'v03_pipeline/var/test/pedigrees/test_pedigree_4_subset.tsv'
1515

16+
TEST_RUN_ID = 'manual__2024-04-03'
17+
1618

1719
class WriteProjectFamilyTablesTest(MockedDatarootTestCase):
1820
def test_snv_write_project_family_tables_task(self) -> None:
1921
worker = luigi.worker.Worker()
2022
write_project_family_tables = WriteProjectFamilyTablesTask(
2123
reference_genome=ReferenceGenome.GRCh38,
2224
dataset_type=DatasetType.SNV_INDEL,
25+
run_id=TEST_RUN_ID,
2326
sample_type=SampleType.WGS,
2427
callset_path=TEST_SNV_INDEL_VCF,
2528
project_guid='R0113_test_project',
@@ -57,6 +60,7 @@ def test_snv_write_project_family_tables_task(self) -> None:
5760
write_project_family_tables_subset = WriteProjectFamilyTablesTask(
5861
reference_genome=ReferenceGenome.GRCh38,
5962
dataset_type=DatasetType.SNV_INDEL,
63+
run_id=TEST_RUN_ID,
6064
sample_type=SampleType.WGS,
6165
callset_path=TEST_SNV_INDEL_VCF,
6266
project_guid='R0113_test_project',

v03_pipeline/lib/tasks/write_variant_annotations_vcf_test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ def test_sv_export_vcf(
4949
UpdateVariantAnnotationsTableWithNewSamplesTask(
5050
reference_genome=ReferenceGenome.GRCh38,
5151
dataset_type=DatasetType.SV,
52+
run_id='run_id1',
5253
sample_type=SampleType.WGS,
5354
callset_path=TEST_SV_VCF,
5455
project_guids=['R0115_test_project2'],
5556
project_remap_paths=['not_a_real_file'],
5657
project_pedigree_paths=[TEST_PEDIGREE_5],
5758
skip_validation=True,
58-
run_id='run_id1',
5959
)
6060
)
6161
worker.add(update_variant_annotations_task)
@@ -64,6 +64,7 @@ def test_sv_export_vcf(
6464
write_variant_annotations_vcf_task = WriteVariantAnnotationsVCF(
6565
reference_genome=ReferenceGenome.GRCh38,
6666
dataset_type=DatasetType.SV,
67+
run_id='run_id1',
6768
sample_type=SampleType.WGS,
6869
callset_path=TEST_SV_VCF,
6970
)

0 commit comments

Comments
 (0)