File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ def test_allele_count_annotations(self) -> None:
33
33
het_samples = 2 ,
34
34
hom_samples = 2 ,
35
35
),
36
+ None ,
36
37
],
37
38
[],
38
39
],
@@ -46,6 +47,7 @@ def test_allele_count_annotations(self) -> None:
46
47
het_samples = 0 ,
47
48
hom_samples = 0 ,
48
49
),
50
+ None ,
49
51
],
50
52
[],
51
53
],
Original file line number Diff line number Diff line change @@ -38,7 +38,18 @@ def compute_callset_lookup_ht(
38
38
],
39
39
),
40
40
).rows ()
41
- return globalize_ids (ht , project_guid )
41
+ ht = globalize_ids (ht , project_guid )
42
+ return ht .annotate (
43
+ project_stats = [
44
+ # Set a family to missing if all values are 0
45
+ ht .project_stats [0 ].map (
46
+ lambda ps : hl .or_missing (
47
+ hl .sum (list (ps .values ())) > 0 ,
48
+ ps ,
49
+ ),
50
+ ),
51
+ ],
52
+ )
42
53
43
54
44
55
def globalize_ids (ht : hl .Table , project_guid : str ) -> hl .Table :
You can’t perform that action at this time.
0 commit comments