earmingol / cell2cell

User-friendly tool to infer cell-cell interactions and communication from gene expression of interacting proteins
BSD 3-Clause "New" or "Revised" License
55 stars 12 forks source link

Too few dimensions in the tensor (issue) #57

Open AtheerAS opened 1 month ago

AtheerAS commented 1 month ago

Hi, Thank you for developing this useful tool.

The code was working fine but my tensor.tensor.shap was (12, 0). I think this caused an issue in the following steps. When I tried to get the list of metadata for each tensor order/dimension, using this parameter: metadata_dicts=[context_dict, ppi_functions, None, None] I got this error message: AssertionError: metadata_dicts should be of the same size as the number of orders/dimensions in the tensor I changed the parameter to: [context_dict, ppi_functions]

And got this error: ValueError: Too few dimensions in the tensor

What do you think?

Thank you!

earmingol commented 1 month ago

From the shape (12, 0) it tells that you have 12 samples, but for some reason none LR pairs is being detected. This issue could be either when specifying the column for the cell types, or with the gene names in your data not matching the gene names in your list of LR pairs.