pySCENIC icon indicating copy to clipboard operation
pySCENIC copied to clipboard

Issue with the "Intersection of gene_names and tf_names is empty" while running the grnboost2 step of pySCENIC in hpc

Open npees1 opened this issue 9 months ago • 3 comments

Hi, I got this error while running the 1st step of pyscenic in hpc-

2025-05-24 17:33:23,938 - pyscenic.cli.pyscenic - INFO - Loading expression matrix.

2025-05-24 17:33:57,266 - pyscenic.cli.pyscenic - INFO - Inferring regulatory networks. Traceback (most recent call last): File "/home/.conda/envs/pyscenic_env/bin/pyscenic", line 8, in sys.exit(main()) File "/home/.conda/envs/pyscenic_env/lib/python3.7/site-packages/pyscenic/cli/pyscenic.py", line 713, in main args.func(args) File "/home/.conda/envs/pyscenic_env/lib/python3.7/site-packages/pyscenic/cli/pyscenic.py", line 111, in find_adjacencies_command seed=args.seed, File "/home/.conda/envs/pyscenic_env/lib/python3.7/site-packages/arboreto/algo.py", line 41, in grnboost2 early_stop_window_length=early_stop_window_length, limit=limit, seed=seed, verbose=verbose) File "/home/.conda/envs/pyscenic_env/lib/python3.7/site-packages/arboreto/algo.py", line 115, in diy expression_matrix, gene_names, tf_names = _prepare_input(expression_data, gene_names, tf_names) File "/home/.conda/envs/pyscenic_env/lib/python3.7/site-packages/arboreto/algo.py", line 229, in _prepare_input raise ValueError('Intersection of gene_names and tf_names is empty.') ValueError: Intersection of gene_names and tf_names is empty.

As per the input, I took the expression matrix generated from the seurat object in CSV format. It would be great if you have any suggestions in sorting out this issue. Thank you!

npees1 avatar May 24 '25 22:05 npees1

I have the exact same issue. I am using a tsv file format. The expression matrix is gene x cell. I have also tried the transpose of the matrix. I have checked the overlap between my transcription factor file genes and the genes in my expression matrix, and there is definitely an overlap. Not sure why I'm still getting the error: ValueError: Intersection of gene_names and tf_names is empty.

AnjaliS1 avatar Jun 05 '25 08:06 AnjaliS1

Same issue. Did you solve it?

I have the exact same issue. I am using a tsv file format. The expression matrix is gene x cell. I have also tried the transpose of the matrix. I have checked the overlap between my transcription factor file genes and the genes in my expression matrix, and there is definitely an overlap. Not sure why I'm still getting the error: ValueError: Intersection of gene_names and tf_names is empty.

Sophielsn avatar Jun 11 '25 15:06 Sophielsn

Hi, I used the CSV file and transposed the matrix after generating it. It really worked well. One thing to be mentioned Genie3 or GRN boost2 works well with the expression matrix if it is in CSV format or as a loom file(as per my understanding). I generated the CSV file using seurat Object in R. Here the CSV file we generate directly from seurat object should contain Genes in columns and Cells in rows where the genie3 or GRNBoost2 expects the opposite to it which I realized later. I suggest you guys to see this and try generating as CSV and transpose it before running the first step in SCENIC.

npees1 avatar Jun 13 '25 17:06 npees1