Skip to content

Commit 0e09b6a

Browse files
committed
Fix optional fields join
1 parent 06136cc commit 0e09b6a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

v03_pipeline/lib/tasks/update_variant_annotations_table_with_new_samples.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def update_table(self, ht: hl.Table) -> hl.Table:
177177
remapped_and_subsetted_callset_path(
178178
self.reference_genome,
179179
self.dataset_type,
180-
callset_path,
180+
callset_path,ca
181181
project_guid,
182182
),
183183
).rows()
@@ -188,6 +188,13 @@ def update_table(self, ht: hl.Table) -> hl.Table:
188188
self.project_pedigree_paths,
189189
)
190190
]
191+
192+
# Drop any fields potentially unshared/unused by the annotations.
193+
for i, callset_ht in enumerate(callset_hts):
194+
for row_field in self.dataset_type.optional_row_fields:
195+
if hasattr(callset_ht, row_field):
196+
callset_hts[i] = callset_ht.drop(row_field)
197+
191198
callset_ht = functools.reduce(
192199
(lambda ht1, ht2: ht1.union(ht2, unify=True)),
193200
callset_hts,

0 commit comments

Comments
 (0)