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

Improvement suggestion for heatmap #16

Open
doncarlos999 opened this issue Jun 9, 2020 · 1 comment
Open

Improvement suggestion for heatmap #16

doncarlos999 opened this issue Jun 9, 2020 · 1 comment

Comments

@doncarlos999
Copy link

Thanks for the great piece package.

I have one suggestion . It would be good to be able to sort the heatmap produced by plot_heatmap_of_gene_clusters on the x axis in the same order as on the plot_profiles_of_gene_clusters.

From this:
seurat_time_course_4CL_and_e4CL_single_batch2020-06-08_18 30 55_heatmap_clustered_hvg_psuper

To This:
seurat_time_course_4CL_and_e4CL_single_batch2020-06-09_02 29 56_heatmap_clustered_hvg_psuper

So that the order matches this:
seurat_time_course_4CL_and_e4CL_single_batch2020-06-08_18 30 55_profile_clustered_hvg_psuper

I was able to achieve it by adding the following code:
go_list_ <- psupertime_go_analysis(naive_psuper, org_mapping="org.Hs.eg.db")
x <- go_list_$plot_dt
x_ord <- with(x, x[order(label_psuper),])
x_ord$cell_id <- factor(x_ord$cell_id, levels = unique(x_ord$cell_id))
go_list_$plot_dt <- x_ord
plot_heatmap_of_gene_clusters(go_list_)

Cheers
Carl

@wmacnair
Copy link
Owner

Hi Carl

Thanks for this suggestion. I'll look at including it :)

Cheers
Will

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