vib-singlecell-nf / scenic

A repository for the scenic module of the vib-singlecell-nf pipeline
0 stars 0 forks source link

Bug mismatch between genes in ex_mtx and row_attrs["Gene"] on sort from SCopeLoom #21

Closed dweemx closed 4 years ago

dweemx commented 4 years ago

The sort function of SCopeLoom generates a mismatch between genes in self.ex_mtx and self.row_attrs["Gene"]:

import export_to_loom
import numpy as np
scope_loom = export_to_loom.SCopeLoom.read_loom(filename="A.loom")
scenic_loom = export_to_loom.SCopeLoom.read_loom(filename="B.loom")
scope_loom.ex_mtx.head()

image

scenic_loom.ex_mtx.head()

image

scope_loom.sort(axis=0, by="Gene")
scenic_loom.sort(axis=0, by="Gene")
assert all(scope_loom.get_genes() == scope_loom.ex_mtx.columns)

image

image

Remark: It's not affecting when running the pipelines because adata files are sorted by Gene at the beginning. The only case is when the APPEND_SCENIC_LOOM process is used with loom files not generated by the pipelines

dweemx commented 4 years ago

This bug is fixed from version 0.15.1