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

Extract gene list in the order plotted on heatmap by plot_pseudotime_heatmap #504

Open
shabs24 opened this issue Dec 6, 2023 · 2 comments

Comments

@shabs24
Copy link

shabs24 commented Dec 6, 2023

Hello!

Is it possible to extract the list of genes in the order they appear on the heatmap in each cluster.

Any help will be appreciated.

Thanks

@shabs24 shabs24 changed the title order of genes from plot_pseudotime_heatmap with cluster information Extract gene list in the order plotted on heatmap from plot_pseudotime_heatmap Dec 15, 2023
@shabs24 shabs24 changed the title Extract gene list in the order plotted on heatmap from plot_pseudotime_heatmap Extract gene list in the order plotted on heatmap by plot_pseudotime_heatmap Dec 15, 2023
@Cynthia1012
Copy link

I have the same problem. Have you managed to solve it?

@shabs24
Copy link
Author

shabs24 commented Apr 17, 2024

I have the same problem. Have you managed to solve it?

Yes, I was able to solve it. Here is the code

t <- plot_pseudotime_heatmap(cds[genes,],cluster_rows = TRUE,
show_rownames = TRUE,return_heatmap=T)
t.data=cutree(t$tree_row, k=6)
t.order = t$tree_row[["order"]]
heatmap.rows = as.data.frame(t.data[t.order])

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