Monocle3 error when passing gene_module_df directly to plot_cells()
0
0
Entering edit mode
2.2 years ago
Lin • 0

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 • 950 views
ADD COMMENT

Login before adding your answer.

Traffic: 3593 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6