-
Notifications
You must be signed in to change notification settings - Fork 10
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
Issue with compute gene-gene distances #4
Comments
Do you install the gene-trajectory module? You can try below code in R. |
Yes, I installed it. But the error still present. |
Hi, I'm not sure what the issue is, but can you try to run
If gene trajectory is not there, can you try to install it as |
data_S <- GeneTrajectory::RunDM(data_S) |
yes, it's possible to export the data to a folder and run using Python as described in #3 (comment) It may be also interesting to reduce the data size as explained in https://klugerlab.github.io/GeneTrajectory/articles/fast_computation.html |
data_S <- GeneTrajectory::RunDM(data_S) |
I see, it's possible to do the whole analysis in Python (see e.g. https://github.com/KlugerLab/GeneTrajectory-python and https://genetrajectory-python.readthedocs.io/latest/notebooks/tutorial_mouse_dermal.html for a tutorial). However, I am afraid you will encounter similar issues. Computing the diffusion map in |
I see,I will try python first. |
I would try randomly subsampling cells to a smaller number (~10k should be manageable, but you can probably do more) or partition the data if you have some meaningful metadata. You can then run Python and R should have similar performances, so use the one you that makes the most sense. It should be possible to subsample in a better way than random for large datasets, but we haven't investigated that yet. The method we use to coarse-grain cells CoarseGrain is based on having a cell-cell distance matrix. One could probably try a similar knn-based approach on a simpler gene embedding that could handle data of your size, but we haven't tested it and it's hard to predict if it would behave correctly. |
Thank you |
Can I use this code( dm_res = palantir.utils.run_diffusion_maps(ad, n_components=5) )instead of (run_dm(adata) )to calculate the intercellular distance? |
I don't have experience with that package but the implementation looks similar. I think you can try it as alternative, just make sure to refer to the layer where the result is put (our package uses "X_dm", change it accordingly). |
Having the same issue, couldn`t find a solution yet. |
Hi @OceanLyu, That seems to be a reticulate installation issue and I don't really have any experience with Windows. |
Thanks for your timely reply! |
I tried to set up a virtualenv using [reticulate], however, I can not find the module.
Here is the output:
> cal_ot_mat_from_numpy <- reticulate::import('gene_trajectory.compute_gene_distance_cmd')$cal_ot_mat_from_numpy
Error: C:/Users/Public/miniconda3/python310.dll - The specified module could not be found.
Should I use Python instead R?
The text was updated successfully, but these errors were encountered: