-
Notifications
You must be signed in to change notification settings - Fork 203
Closed
Labels
resultsQuestion about pySCENIC resultsQuestion about pySCENIC results
Description
In export.py these lines cause an error when using a sparse data frame:
# Calculate the number of genes per cell.
binary_mtx = ex_mtx.copy()
binary_mtx[binary_mtx != 0] = 1.0
ngenes = binary_mtx.sum(axis=1).astype(int)
Something like this (not-tested) could be used for sparse pandas:
ngenes = ex_mtx.values().count_nonzero().astype(int)
The question is, is a dense matrix required at any point for creating the loom file? Otherwise changing these would be more efficient for very large data sets.
Cheers!
C
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
resultsQuestion about pySCENIC resultsQuestion about pySCENIC results