psupertime
psupertime copied to clipboard
Improvement suggestion for heatmap
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:
To This:
So that the order matches this:
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
Hi Carl
Thanks for this suggestion. I'll look at including it :)
Cheers Will