aertslab / pySCENIC

pySCENIC is a lightning-fast python implementation of the SCENIC pipeline (Single-Cell rEgulatory Network Inference and Clustering) which enables biologists to infer transcription factors, gene regulatory networks and cell types from single-cell RNA-seq data.
http://scenic.aertslab.org
GNU General Public License v3.0
420 stars 179 forks source link

[BUG] modules_from_adjacencies for iRegulon crashes computer #363

Closed Jay-Leung closed 2 years ago

Jay-Leung commented 2 years ago

Describe the bug I was following the pbmc tutorial to get the modules from the adjacencies file for input into iRegulon. However, the modules_from_adjacencies command kept crashing my computer.

Steps to reproduce the behavior

  1. Command run when the error occurred:

    from pyscenic.utils import modules_from_adjacencies
    modules = list(modules_from_adjacencies(adjacencies, exprMat))
  2. Error encountered:

    Computer crashed and had to be restarted

Expected behavior I expected to get the modules from the adjacencies file, but the computer crashes. I am currently using Ubuntu Linux 20.04 LTS virtual machine, and ran the script using Jupyter notebook. I am not sure what is causing the crash, it has happened 3 times. Is there another way to get the individual modules for iRegulon?

Please complete the following information:

Thank you!

Regards, Jay

SeppeDeWinter commented 2 years ago

Hi @Jay-Leung

It could be that you are running out of memory.

You could also try to visualise the Regulons in iRegulon, if you were able to generate the dict of regulons before.

You will have to slightly modify the code for writing the data to file.

Let me know if you need further help.

Best,

Seppe

Jay-Leung commented 2 years ago

Hi Seppe,

Yes, I managed to get the Regulons out to iRegulon.

Thanks!

Regards, Jay