decoupler-py icon indicating copy to clipboard operation
decoupler-py copied to clipboard

run_ora using adata as the input

Open biopzhang opened this issue 11 months ago • 2 comments

Describe the bug Using adata as input, if there is an empty sample (i.e., expression of the cell/sample is 0 for all genes), there will be an error writing the results to adata.obsm due to the deletion of the empty sample(s).

dc.run_ora( mat=adata, net=msigdb, source='geneset', target='genesymbol', verbose=True, use_raw=False )

To Reproduce As described above.

Expected behavior As described above.

System

  • OS: [e.g. macOS Ventura]
  • Python version [e.g. 3.9]

Additional context By any means, an empty sample should not be present in the data. However, as decoupler actively check for empty samples and genes and deletes them, for integrity, it might be reasonable to return the repaired adata with results.

biopzhang avatar Jul 11 '23 19:07 biopzhang