psupertime icon indicating copy to clipboard operation
psupertime copied to clipboard

Improvement suggestion for heatmap

Open doncarlos999 opened this issue 4 years ago • 1 comments

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

doncarlos999 avatar Jun 09 '20 08:06 doncarlos999

Hi Carl

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

Cheers Will

wmacnair avatar Jun 14 '20 18:06 wmacnair