Skip to content

Commit 31e7ac5

Browse files
committed
fix qc integration test
1 parent 2ec5501 commit 31e7ac5

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
## MAJOR CHANGES
2626

27-
* `qc/calculate_qc_metrics`: major improvements to memory consumption and runtimes (PR #1140).
27+
* `qc/calculate_qc_metrics`: major improvements to memory consumption and runtimes (PR #1140, #1189).
2828

2929
* `annotate/popv`: bump version to 0.6.1 (PR #1167).
3030

src/qc/calculate_qc_metrics/script.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,9 @@ def main():
296296
logger.info(".obs shape for %s is %s", mod, obs.shape)
297297
modality_anndatas[mod] = AnnData(var=var, obs=obs)
298298

299+
original_global_obs = read_elem(open_mudata["/obs"])
300+
original_global_var = read_elem(open_mudata["/var"])
301+
299302
logger.info("Reading layer %s", "X" if not par["layer"] else par["layer"])
300303
layer = read_elem(open_mudata[layer_element_name])
301304
logger.info("Found layer with shape %s and dtype %s", layer.shape, layer.dtype)
@@ -326,6 +329,15 @@ def main():
326329
mudata_skeleton.obs.shape,
327330
)
328331

332+
for col in original_global_obs.columns.difference(mudata_skeleton.obs.columns):
333+
mudata_skeleton.obs[col] = original_global_obs.loc[
334+
mudata_skeleton.obs.index, col
335+
]
336+
for col in original_global_var.columns.difference(mudata_skeleton.var.columns):
337+
mudata_skeleton.var[col] = original_global_var.loc[
338+
mudata_skeleton.var.index, col
339+
]
340+
329341
logger.info("Writing to %s", par["output"])
330342
try:
331343
copytree(par["input"], par["output"], symlinks=True)

0 commit comments

Comments
 (0)