Skip to content

Commit 5abc4c1

Browse files
committed
lint
1 parent 869f3bd commit 5abc4c1

File tree

5 files changed

+32
-32
lines changed

5 files changed

+32
-32
lines changed

v03_pipeline/lib/misc/lookup.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def compute_callset_lookup_ht(
3535
},
3636
),
3737
),
38-
]
38+
],
3939
),
4040
).rows()
4141
return globalize_ids(ht, project_guid)
@@ -142,11 +142,11 @@ def join_lookup_hts(
142142
ht.project_stats.extend(
143143
ht.project_guids_1.map(
144144
lambda _: hl.missing(ht.project_stats_1.dtype.element_type),
145-
)
145+
),
146146
),
147147
)
148148
.when(
149-
hl.is_missing(ht_project_i), ht.project_stats.extend(ht.project_stats_1)
149+
hl.is_missing(ht_project_i), ht.project_stats.extend(ht.project_stats_1),
150150
)
151151
.when(
152152
hl.is_missing(ht.project_stats),
@@ -157,15 +157,15 @@ def join_lookup_hts(
157157
lambda i, p: (
158158
hl.or_missing(
159159
i == ht_project_i,
160-
ht.project_families[project_guid]
160+
ht.project_families[p]
161161
.map(
162162
lambda _: hl.missing(
163-
ht.project_stats.dtype.element_type.element_type
164-
)
163+
ht.project_stats.dtype.element_type.element_type,
164+
),
165165
)
166166
.extend(ht.project_stats_1[0]),
167167
)
168-
)
168+
),
169169
),
170170
)
171171
.when(
@@ -181,12 +181,12 @@ def join_lookup_hts(
181181
ps.extend(
182182
ht.project_families_1[project_guid].map(
183183
lambda _: hl.missing(
184-
ht.project_stats.dtype.element_type.element_type
185-
)
186-
)
184+
ht.project_stats.dtype.element_type.element_type,
185+
),
186+
),
187187
),
188188
)
189-
)
189+
),
190190
),
191191
)
192192
.default(
@@ -196,7 +196,7 @@ def join_lookup_hts(
196196
i != ht_project_i,
197197
ps,
198198
ht.project_stats[ht_project_i].extend(
199-
ht.project_stats_1[0]
199+
ht.project_stats_1[0],
200200
),
201201
)
202202
),
@@ -224,7 +224,7 @@ def join_lookup_hts(
224224
(
225225
item[0],
226226
ht.project_families[project_guid].extend(
227-
ht.project_families_1[project_guid]
227+
ht.project_families_1[project_guid],
228228
),
229229
),
230230
),

v03_pipeline/lib/misc/lookup_test.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ def test_join_lookup_hts_empty_table(self) -> None:
320320
hl.Struct(
321321
project_guids=['project_a'],
322322
project_families={'project_a': ['1', '2', '3']},
323-
)
323+
),
324324
],
325325
)
326326
self.assertCountEqual(
@@ -345,7 +345,7 @@ def test_join_lookup_hts_empty_table(self) -> None:
345345
heteroplasmic_samples=2,
346346
homoplasmic_samples=2,
347347
),
348-
]
348+
],
349349
],
350350
),
351351
hl.Struct(
@@ -367,7 +367,7 @@ def test_join_lookup_hts_empty_table(self) -> None:
367367
heteroplasmic_samples=2,
368368
homoplasmic_samples=2,
369369
),
370-
]
370+
],
371371
],
372372
),
373373
],
@@ -512,7 +512,7 @@ def test_join_lookup_hts_new_project(self) -> None:
512512
'project_b': ['3'],
513513
'project_c': ['1', '2'],
514514
},
515-
)
515+
),
516516
],
517517
)
518518
self.assertCountEqual(
@@ -538,7 +538,7 @@ def test_join_lookup_hts_new_project(self) -> None:
538538
ref_samples=2,
539539
heteroplasmic_samples=2,
540540
homoplasmic_samples=2,
541-
)
541+
),
542542
],
543543
[
544544
hl.Struct(
@@ -574,7 +574,7 @@ def test_join_lookup_hts_new_project(self) -> None:
574574
ref_samples=2,
575575
heteroplasmic_samples=2,
576576
homoplasmic_samples=2,
577-
)
577+
),
578578
],
579579
None,
580580
],
@@ -739,7 +739,7 @@ def test_join_lookup_hts_existing_project(self) -> None:
739739
'project_a': ['1', '2'],
740740
'project_b': ['3', '1', '2'],
741741
},
742-
)
742+
),
743743
],
744744
)
745745
self.assertCountEqual(

v03_pipeline/lib/paths.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def remapped_and_subsetted_callset_path(
140140
)
141141

142142

143-
def family_lookup_table_path(
143+
def lookup_table_path(
144144
reference_genome: ReferenceGenome,
145145
dataset_type: DatasetType,
146146
) -> str:

v03_pipeline/lib/paths_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
from v03_pipeline.lib.paths import (
1111
family_table_path,
1212
imported_callset_path,
13+
lookup_table_path,
1314
metadata_for_run_path,
1415
project_table_path,
1516
relatedness_check_table_path,
1617
remapped_and_subsetted_callset_path,
17-
family_lookup_table_path,
1818
sex_check_table_path,
1919
valid_cached_reference_dataset_query_path,
2020
valid_reference_dataset_collection_path,
@@ -83,9 +83,9 @@ def test_valid_reference_dataset_collection_path(self) -> None:
8383
'/seqr-reference-data-private/v03/GRCh38/SNV_INDEL/reference_datasets/hgmd.ht',
8484
)
8585

86-
def test_family_lookup_table_path(self) -> None:
86+
def test_lookup_table_path(self) -> None:
8787
self.assertEqual(
88-
family_lookup_table_path(
88+
lookup_table_path(
8989
ReferenceGenome.GRCh37,
9090
DatasetType.SV,
9191
),

v03_pipeline/lib/tasks/update_lookup_table.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
import hail as hl
22
import luigi
33

4-
from v03_pipeline.lib.misc.family_lookup import (
5-
compute_callset_family_lookup_ht,
4+
from v03_pipeline.lib.misc.lookup import (
5+
compute_callset_lookup_ht,
6+
join_lookup_hts,
67
remove_new_callset_family_guids,
7-
join_family_lookup_hts,
88
)
9-
from v03_pipeline.lib.paths import family_lookup_table_path
9+
from v03_pipeline.lib.paths import lookup_table_path
1010
from v03_pipeline.lib.tasks.base.base_update_task import BaseUpdateTask
1111
from v03_pipeline.lib.tasks.files import GCSorLocalTarget
1212
from v03_pipeline.lib.tasks.write_remapped_and_subsetted_callset import (
1313
WriteRemappedAndSubsettedCallsetTask,
1414
)
1515

1616

17-
class UpdateFamilyLookupTableTask(BaseUpdateTask):
17+
class UpdateLookupTableTask(BaseUpdateTask):
1818
callset_path = luigi.Parameter()
1919
project_guid = luigi.Parameter()
2020
project_remap_path = luigi.Parameter()
@@ -34,7 +34,7 @@ class UpdateFamilyLookupTableTask(BaseUpdateTask):
3434

3535
def output(self) -> luigi.Target:
3636
return GCSorLocalTarget(
37-
family_lookup_table_path(
37+
lookup_table_path(
3838
self.reference_genome,
3939
self.dataset_type,
4040
),
@@ -88,12 +88,12 @@ def update_table(self, ht: hl.Table) -> hl.Table:
8888
self.project_guid,
8989
list(callset_mt.family_samples.collect()[0].keys()),
9090
)
91-
callset_ht = compute_callset_family_lookup_ht(
91+
callset_ht = compute_callset_lookup_ht(
9292
self.dataset_type,
9393
callset_mt,
9494
self.project_guid,
9595
)
96-
ht = join_sample_lookup_hts(
96+
ht = join_lookup_hts(
9797
ht,
9898
callset_ht,
9999
)

0 commit comments

Comments
 (0)