Dear all,
I have just started the 'Monocle 3' and followed it using the same code and data in the tutorial here.
When I run the code as below,
pr_graph_test_res <- graph_test(cds_subset, neighbor_graph="knn", cores=8)
pr_deg_ids <- row.names(subset(pr_graph_test_res, morans_I > 0.01 & q_value < 0.05))
gene_module_df <- find_gene_modules(cds_subset[pr_deg_ids,], resolution=1e-3)
it returns the error as below.
*Error in uwot(X = X, n_neighbors = n_neighbors, n_components = n_components, :
n_neighbors must be smaller than the dataset size*
I will very much appreciate it if you give me any advice or suggestion about this error.
Thanks,
Joshua
Hi,
Most likely your rownames(cds@preprocess_aux$gene_loadings) are different gene ID type than rownames(cds). It could happen e.g. when you change rownames(cds) after running preprocess_cds(). Just modify your rownames(cds) and make sure that your gene subset you provide for find_gene_modules() is present in rownames(cds@preprocess_aux$gene_loadings).
Best, Michal