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

get a weird figure following the notebook named Bone marrow fates #32

Open
huili469r opened this issue May 17, 2024 · 1 comment
Open

Comments

@huili469r
Copy link

Hi!. I try to show the differentiation trajectory of HSC followed the tutorial. After PCA, diffusion, palantir, I got a unexpected figure.
image
The branch tip cells looks like a string. I try to add the components of PCA as the input of diffusion. I also try to reduce the number of progenitor cells. But Both don't work. Can you give me some advices? Thanks a lot.
pca_projections =pd.DataFrame(adata.obsm["X_pca"],index=adata.obs_names) dm_res = palantir.utils.run_diffusion_maps(pca_projections, n_components=40, knn=30) ms_data = palantir.utils.determine_multiscale_space(dm_res, #n_eigs=4 adata.obsm["X_palantir"]=ms_data.values sc.pp.neighbors(adata,n_neighbors=25,use_rep="X_palantir") adata.obsm["X_pca2d"]=adata.obsm["X_pca"][:,:2] sc.tl.draw_graph(adata,init_pos='X_pca2d') sc.pl.draw_graph(adata,color="celltype")

@LouisFaure
Copy link
Owner

LouisFaure commented May 27, 2024

Are you using ForceAtlas2 algorithm? I think that sc.tl.draw_graph uses another one if it is not installed which can lead to such overlapping branches. FA2 seems to be not well maintained these days unfortunately, I would recommend to try out instead openTSNE package, and use a high exaggeration parameter (around 2 to 4).

Some dataset also do not requires diffusion maps as intermediate step and can produce well connected embeddings with clear branch separation with FA2/openTSNE applied directly on PC space.

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