-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
liana_tensor_c2c error: All input columns must be contained in all dataframes included in 'context_dict' #149
Comments
@earmingol this seems like a custom exception. Any suggestions? Is this the tutorial that you're running: https://ccc-protocols.readthedocs.io/en/latest/notebooks/ccc_R/QuickStart.html |
Yes, the issue is related to the column names passed as input, one or more of them does not match the column names in the dataframes. |
Thanks a lot @dbdimitrov and @earmingol for the fast replies. The tutorial I'm following is this one: Maybe the discrepancy between the names comes because I changed the identities of the Seurat object ( Thank you! |
Hmm, everything seems right, maybe try passing columns explicitly:
The only weird thing to me in your object is when inspecting the ligand and receptor columns (ligand.complex and receptor.complex as well) and you have names like "F10", "F3", and "F7". Maybe there is something with the gene names? Anyways, I recommend giving a try to this tutorial instead: https://ccc-protocols.readthedocs.io/en/latest/notebooks/ccc_R/QuickStart.html And install the tools as indicated here: https://github.com/saezlab/ccc_protocols/tree/main/env_setup |
Thanks @earmingol!! Indeed, you spotted a big mistake on my side, I forgot to pass my custom resource (mouse genes) to the
I will start over again following the tutorial you recommended and see if I the error still happens. Thank you! |
Not sure what this error could be about, exactly what code generated it? I suspect it could be due to negative values in your scores? Did you normalize/scale your expression values? If so it could be due to zero-centering your values so you get negative normalized expression for some genes. Make sure that all expression values are non negative. Maybe @dbdimitrov could have more insights about this |
Hi @alvarezprado, it could be that the resource is not formatted correctly and somehow it seems to affect the dimensions of your data? You could also use liana's internal mouse resource by passing "MouseConsensus" to the |
Thanks @earmingol and @dbdimitrov, I started from scratch following your advice and now everything works fine, I think the last error was probably related to wrong formatting. I'm closing this issue, thank you once again for your help and for this fantastic tool! |
Hi,
Thanks for developing LIANA, it's a truly wonderful tool. I'm trying to run tensor decomposition on my data to compare cell-cell communication between two conditions (WT and KO for our gene of interest) following the documentation but I get an error I don't know how to interpret when I run
liana_tensor_c2c
function:This is the output of
reticulate::py_last_error()$r_trace$full_call
Python Exception Message
Traceback (most recent call last): File "/Users/angel/Library/Caches/org.R-project.R/R/basilisk/1.15.2004/liana/0.1.13/liana_cell2cell/lib/python3.8/site-packages/cell2cell/tensor/external_scores.py", line 117, in dataframes_to_tensor assert all([c in df.columns for c in cols for df in context_df_dict.values()]), "All input columns must be contained in all dataframes included in 'context_dict'" AssertionError: All input columns must be contained in all dataframes included in 'context_dict'
R Traceback
`▆
Do you know what might be the problem here? Any input will be much appreciated.
Thank you!
The text was updated successfully, but these errors were encountered: