This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Monocle3 error when passing gene_module_df directly to plot_cells()

Hello I'm a new computational biologist and I'm following the Monocle3's guide on finding modules of co-regulated genes https://cole-trapnell-lab.github.io/monocle3/docs/differential/#gene-modules

But when I run the plot_cells() function, it keeps showing an error after I pass gene_module_df directly to plot_cells():

Error in !is.null(dim(genes)) && dim(genes) >= 2 : 'length = 2' in coercion to 'logical(1)'

The code that produced the bug is below:

graph_test_res <- graph_test(cds_order_3, neighbor_graph="knn", cores=2)
pr_deg_ids <- row.names(subset(graph_test_res, q_value < 0.05))
gene_module_df <- find_gene_modules(cds_order_3[pr_deg_ids,], resolution=1e-2, cores=2) 
plot_cells(cds_order_3,
           genes=gene_module_df %>% filter(module %in% c(40, 39, 36, 17)),
           group_cells_by="cluster",
           color_cells_by="cluster",
           show_trajectory_graph=FALSE)

enter image description here

Could you please tell me what's wrong in my code? Thanks!

monocle3

0 answers

No answers yet.

Log in to answer this question.