wu-yc / scMetabolism

Quantifying metabolism activity at the single-cell resolution
BSD 3-Clause "New" or "Revised" License
95 stars 37 forks source link

Fix issue when reduction uses a different key #28

Closed bbimber closed 3 weeks ago

bbimber commented 5 months ago

Hello - I ran into this issue with a seurat object that has a UMAP that was created with an alternate key property. If this happens, the colnames of the embeddings would be something like 'rnaUMAP_1', not UMAP_1. This is a simple fix for that situation.

bbimber commented 5 months ago

@wu-yc: the second commits switch from needing to use library() in the module to importing it in NAMESPACE. I think that's going to be more robust, including if another package loads this.