I have a cell data set object (cds1
) which I ran preprocess
, reduce_dimension
and cluster_cells
functions on in monocle3 (most recent version). However when I ran the function plot_genes_by_group, the dot plot looks good except that the clusters on the x-axis are not in numerical order (from 1 on the left to 24 on the right). How do I modify my code so that my x-axis is listed in numerical order (cds1 is my starting cell data set object)? I'll put a snippet of my code here.
markergenes <- top_markers(cds1, group_cells_by="cluster", genes_to_test_per_group = 25, reference_cells=1000, cores=1)
top_specific_markers <- markergenes %>%
filter(fraction_expressing >= 0.10) %>%
group_by(cell_group) %>%
top_n(2, pseudo_R2)
top_specific_marker_ids <- unique(top_specific_markers %>% pull(gene_id))
plot_genes_by_group(cds1,
top_specific_marker_ids,
group_cells_by="cluster",
ordering_type="maximal_on_diag",
max.size= 3)
The monocle version that I am using is Monocle3-1.3.4