monocle-release icon indicating copy to clipboard operation
monocle-release copied to clipboard

plot_genes_branched_pseudotime and beam not working

Open joelma1 opened this issue 2 years ago • 7 comments

when I run: plot_genes_branched_pseudotime(cds[my_pseudotime_gene,], branch_point = 1, color_by = "celltype")

I get: Warning in class(cellData) != "matrix" && isSparseMatrix(cellData) == FALSE : 'length(x) = 2 > 1' in coercion to 'logical(1)' Error in if (isSparseMatrix(exprs(X))) { : the condition has length > 1

Similarly when I run: BEAM_res <- BEAM(cds[expressed_genes,], branch_point = 1, cores = 1)

I get: Error in if (progenitor_method == "duplicate") { : the condition has length > 1

So far, all the other functions work. I can see that I have one branch in my trajectory. Thanks.

joelma1 avatar Jul 07 '22 23:07 joelma1

I have the same BEAM error. Have you solved this problem?

ayueme avatar Aug 14 '22 13:08 ayueme

So am I.I have got this problem after update some packages.

LYNLLL avatar Sep 06 '22 03:09 LYNLLL

I have met the same issues. I modified the source code of the package on the basis of the other issue's solution.

We need to edit to update the package by following another issue.

There are three pieces of code that need to be updated.

First, change the code of monocle/R/order_cell.R in function project2MST() from if(class(projection) != 'matrix') projection <- as.matrix(projection) to projection <- as.matrix(projection)

Second, modified the code of / monocle/R /BEAM.R from:

if (progenitor_method == "duplicate") { }
else if (progenitor_method == "sequential_split") { }

to:

if ('duplicate' %in% progenitor_method){}
else if('sequential_split' %in% progenitor_method){}

Third, modified the code of / monocle/R /utils.R from: class(x) %in% c("dgCMatrix", "dgTMatrix") to: any(class(x) %in% c("dgCMatrix", "dgTMatrix"))

zy-fang avatar Nov 11 '22 03:11 zy-fang

Hi,@zy-fang Sorry to trouble you. I have the same problem: p1=plot_genes_branched_heatmap(HSMM[row.names(subset(BEAM_res_1, qval < 1e-4)),], branch_point = 2, num_clusters = 4, cores = 2, use_gene_short_name = T, show_rownames = F)

I get: Warning messages: 1: In class(cellData) != "matrix" && isSparseMatrix(cellData) == FALSE : 'length(x) = 2 > 1' in coercion to 'logical(1)' 2: closing unused connection 4 (<-DESKTOP-EDG51VM:11955) 3: closing unused connection 3 (<-DESKTOP-EDG51VM:11955)

The heatmap can be drawn, but the "p1" returns NULL. I tried the method you provided, but there is still warning.I want to extract the genes in the heatmap for enrichment analysis, but "p1" keeps returning NULL, what should I do?

SuqinYang avatar Nov 13 '22 05:11 SuqinYang

We need to set the parameter ”return_heatmap = TRUE“

zy-fang avatar Nov 14 '22 01:11 zy-fang

Hi,

I solved using the method given by @zy-fang. Thanks for the help. However just after the ordercell I had to run plot_cell_trajectory(cds_subset)

which gave me the following error:

rror in .standalone_types_check_dot_call(ffi_standalone_check_number_1.0.7, : object 'ffi_standalone_check_number_1.0.7' not found

Any help is highly appreciated.

Many thanks!

ruchikabhat avatar Mar 20 '23 18:03 ruchikabhat

Hi,@zy-fang Sorry to trouble you. I have the same problem: p1=plot_genes_branched_heatmap(HSMM[row.names(subset(BEAM_res_1, qval < 1e-4)),], branch_point = 2, num_clusters = 4, cores = 2, use_gene_short_name = T, show_rownames = F)

I get: Warning messages: 1: In class(cellData) != "matrix" && isSparseMatrix(cellData) == FALSE : 'length(x) = 2 > 1' in coercion to 'logical(1)' 2: closing unused connection 4 (<-DESKTOP-EDG51VM:11955) 3: closing unused connection 3 (<-DESKTOP-EDG51VM:11955)

The heatmap can be drawn, but the "p1" returns NULL. I tried the method you provided, but there is still warning.I want to extract the genes in the heatmap for enrichment analysis, but "p1" keeps returning NULL, what should I do?

Hi, I just met the same problem:"p1" returns NULL..Have you solved this problem? thanks

howtofindme avatar May 19 '23 07:05 howtofindme