ventolab / CellphoneDB

CellPhoneDB can be used to search for a particular ligand/receptor, or interrogate your own HUMAN single-cell transcriptomics data.
https://www.cellphonedb.org/
MIT License
304 stars 52 forks source link

KeyError: 'LAMA3_integrin_a3b1_complex' when running cpdb_statistical_analysis_method.call #185

Closed VittoriaDBocchi closed 1 month ago

VittoriaDBocchi commented 2 months ago

HI! Thank you for developing this tool. I tried to run cpdb_statistical_analysis_method.call as follows image However when getting to this step:

Step 5: calculate the ligand-receptor score.

--> 344 interaction_scores = score_product(matrix=cpdb_fms, means=means, separator=separator, interactions=interactions, id2name=id2name, threads=threads) return interaction_scores

I get this error KeyError: 'LAMA3_integrin_a3b1_complex'

I am not if this is a problem of the database or my data but not sure how to solve this. Thank you so much in advance for your help. All the best, Vittoria

VittoriaDBocchi commented 2 months ago

I think this happens specifially when I add "score_interactions = True"

cakirb commented 2 months ago

Hi @VittoriaDBocchi,

This error (also reported at #176) happens when the counts are not in the correct format, could you please make sure that they are log-normalised without z-scaling so the zeros won't be transformed?

Best, Batu

VittoriaDBocchi commented 2 months ago

Thank you so much!!

cakirb commented 1 month ago

Hi @VittoriaDBocchi,

Assuming your problem has been fixed, I'm closing this issue. Feel free to reopen it if the same problem persists.

Best, Batu