Skip to content
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

c2c.analysis.run_tensor_cell2cell_pipeline #58

Open
Iammaai opened this issue Jun 7, 2024 · 14 comments
Open

c2c.analysis.run_tensor_cell2cell_pipeline #58

Iammaai opened this issue Jun 7, 2024 · 14 comments

Comments

@Iammaai
Copy link

Iammaai commented Jun 7, 2024

Hello,
When I used your tool to analyze my data, I found that the graph of tensor decomposition I ran out had no legend, so I couldn't get which color represented which cell. How did you get the legend then?

Hope to get your answer!

Thanks !

@earmingol
Copy link
Owner

Hi! It could be due to the version of matplotlib you are using. Which version are you using?

I recommend using v.3.7.3. Also, if you are using plotnine in combination with matplotlib (for example when using LIANA), I know that importing plotnine also messes up the plots from tensor-cell2cell.

@Iammaai
Copy link
Author

Iammaai commented Jun 8, 2024

Hi!Thank you very much for your answer!

The version of matplotlib I used was 3.7.2.After I changed the version of matplotlib to 3.7.3 as you said, the result is still the same as before.I'm also wondering why?

I have one more question.When I installed the new version, there was a problem that my version of pandas was too low to install the matplotlib dependency package, because my version of pandas was 1.3.5, and he needed the version of pandas to be higher than 1.5.0.Before, there was no result in the process of tensor decomposition. After reading some questions on GitHub, you answered that the pandas version is 1.3.5. After I modified the pandas version to 1.3.5, the result was indeed produced.I don't know if the relationship between the matplotlib dependency package and the pandas version will affect the result of my drawing.

In addition,plotnine you mentioned may affect the result of tensor-cellcell. I have uninstalled plotnine, but the result is still without legend.

The results without legend that I obtained using your COVID-19 data are attached.
BALF-TensorFactorization

Thanks!

@earmingol
Copy link
Owner

Hi! Quick question, which python version and cell2cell version are you using? You might need creating a new environment with proper versions I think. This could be a good starting point: https://github.com/saezlab/ccc_protocols/tree/main/env_setup

@Iammaai
Copy link
Author

Iammaai commented Jun 11, 2024

Hi! Quick question, which python version and cell2cell version are you using? You might need creating a new environment with proper versions I think. This could be a good starting point: https://github.com/saezlab/ccc_protocols/tree/main/env_setup

Hi!Thank you for your reply!My python version is 3.9, and my cell2cell version is 0.6.4.

I have seen that python is 3.10 on this website, and the versions of some other packages have been updated. I am trying the new environment, because the GPU I use has some problems when installing cuda, and I am trying to solve the problem to see if it can be successful.

@earmingol
Copy link
Owner

earmingol commented Jun 12, 2024

I think before trying a new environment you should try updating cell2cell to the latest version (0.7.4), the legend issue was solved in v0.7.0 (see notes here). I think you are having this issue because your version is v0.6.4

@Iammaai
Copy link
Author

Iammaai commented Jun 13, 2024

I think before trying a new environment you should try updating cell2cell to the latest version (0.7.4), the legend issue was solved in v0.7.0 (see notes here). I think you are having this issue because your version is v0.6.4

Hi!Thank you very much for your answer, this legend problem has been solved!

However, I still have a small problem. When I installed cell2cell version 0.7.4, the pands version showed that it should be automatically updated to the new version, but when I ran your example at the beginning, there was a tensor decomposition error. Then I read your answer and set pands version to 1.3.5 to solve this problem. But now if I use cell2cell as the new version, does the pands version need to be updated?

Looking forward to your reply!

@earmingol
Copy link
Owner

Can you show me what error you get with the new pandas version? I could generate a quick fix for that to allow compatibility. Anyways, I don't think you need to update pandas if you don't want to do it.

Also, pandas 1.5.1 could be a newer and safer version to use.

@Iammaai
Copy link
Author

Iammaai commented Jun 14, 2024

Can you show me what error you get with the new pandas version? I could generate a quick fix for that to allow compatibility. Anyways, I don't think you need to update pandas if you don't want to do it.

The mistake was:TypeError:Passing a set as an indexer is not supported.Use a list instead.
微信图片_20240614230422

At that time, the problem was very puzzling to me, and I tried many methods but failed to solve it. Then I saw that others had the same problem, and you replied that you should change the pandas version to 1.3.5, and I solved the problem after modifying the version.Now I don't know if the problem will occur again in the version update, so I dare not update the pandas version.

@earmingol
Copy link
Owner

Oh this issue shouldn't happen with the latest version of cell2cell, it was already fixed :) so feel free to update pandas if you want

@Iammaai
Copy link
Author

Iammaai commented Jun 15, 2024

Oh this issue shouldn't happen with the latest version of cell2cell, it was already fixed :) so feel free to update pandas if you want

Thank you very much for your answer, which is very helpful to me!

@Iammaai
Copy link
Author

Iammaai commented Aug 10, 2024

Hello,
Sorry to bother you again!

As my data is only tensor-cell2cell and the result is not good, I plan to use LIANA combined with tensor-cell2cell method, but there are the following errors in the ligand receptor inference process, I tried to solve them but did not solve them, I want to know which part of the index is adata. I hope I can get your help.
e8d9c86d143879eaad55a74639f6b58

Hope to get your answer!

Thanks !

@earmingol
Copy link
Owner

Looks like you data have duplicated gene names. You could try using adata.var_names_make_unique() before running the pipeline.

@Iammaai
Copy link
Author

Iammaai commented Aug 28, 2024

Looks like you data have duplicated gene names. You could try using adata.var_names_make_unique() before running the pipeline.

Hello, I have tried this operation and the results show that there are no duplicate gene names and no null values. Then I will nan of adata. X are replaced by 0.But still an error that pandas. Errors. InvalidIndexError: Reindexing only valid with uniquely valued Index objects. I'm very upset and I don't know what's wrong with it? What else do you think might be the problem?

Or is the source of the error related to the version of these packages being used? Do I need to set up a specific version or a newer version?What is the main package version you used?

Hope to get your answer!

Thanks !

@Iammaai
Copy link
Author

Iammaai commented Aug 29, 2024

Hello,I updated the version of liana to 1.3.0 and the error was resolved!Thank you for your kind reply!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants