pySCENIC icon indicating copy to clipboard operation
pySCENIC copied to clipboard

f_db_names outputs empty

Open Jiayi-Zheng opened this issue 1 year ago • 1 comments

Hello, I was working step-by-step with https://github.com/aertslab/SCENICprotocol/blob/master/notebooks/PBMC10k_SCENIC-protocol-CLI.ipynb During STEP 2-3: Regulon prediction aka cisTarget from CLI, I did:

import glob
# ranking databases
f_db_glob = "/gene_based/*feather"
f_db_names = ' '.join( glob.glob(f_db_glob) )

I downloaded all six files from https://resources.aertslab.org/cistarget/databases/homo_sapiens/hg38/refseq_r80/mc9nr/gene_based/ (also tried https://resources.aertslab.org/cistarget/databases/homo_sapiens/hg38/refseq_r80/mc_v10_clust/gene_based/ ) and named the folder containing these six files as gene_based. However, when I wanted to check the output of f_db_names it gives blank outcome. I'm not sure what is happening here...?

Meanwhile, really appreciate it if you could explain a bit more on When using the modules_from_adjacencies function directly in python instead of via the command line, the rho_mask_dropouts option can be used to control this.? I'm still not sure why running this step in python is better than command line directly (and I'm currently having some problem with it, as I could run pyscenic in command line with the conda env on, however, with working under kernel in the same conda env, !pyscenic returns /bin/bash: pyscenic: command not found )...

Thank you very much!

Jiayi-Zheng avatar Mar 06 '23 06:03 Jiayi-Zheng

The CLI version is the recommended way to run pySCENIC nowadays and is the only way we run it internally.

Preferably use container images: https://pyscenic.readthedocs.io/en/latest/installation.html#docker-podman-and-singularity-apptainer-images

Probably in your case you wanted a relative path instead of an absolute path:

import glob
# ranking databases
f_db_glob = "./gene_based/*feather"
f_db_names = ' '.join( glob.glob(f_db_glob) )

You probably didn't install the pySCENIC package as only installing the package will install the pyscenic CLI:

cd pySCENIC
pip install .

ghuls avatar Jun 13 '23 12:06 ghuls