Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

what is the "condition" in orderCells() function #434

Open
lizhaozhi opened this issue Oct 7, 2020 · 51 comments
Open

what is the "condition" in orderCells() function #434

lizhaozhi opened this issue Oct 7, 2020 · 51 comments

Comments

@lizhaozhi
Copy link

Hi,

I am trying to construct single-cell trajectories using monocle, but I got an error message when I use the orderCells() function.
the condition has length > 1 and only the first element will be used

any ideas what's going on? Appreciate your ideas.


Maybe it is caused by one if() statement in project2MST() function.
The class of this projection matrix in this project2MST() function is c("matrix", "array").

  projection <- rbind(projection, tmp)        -> "matrix", "array"
  if(class(projection) != 'matrix')                 -> error
    projection <- as.matrix(projection)

possible solution:
projection <- as.matrix(rbind(projection, tmp))


version:
R Biobase eSet ExpressionSet CellDataSet
"4.0.0" "2.48.0" "1.3.0" "1.0.0" "1.2.0"

@wwh199459
Copy link

I have the same problem, did you solve it? Error in if (class(projection) != "matrix") projection <- as.matrix(projection) :
the condition has length > 1
此外: Warning message:
In graph.dfs(dp_mst, root = root_cell, neimode = "all", unreachable = FALSE, :
Argument neimode' is deprecated; use mode' instead

@wangshisheng
Copy link

I have the same problem, too. Anyone could help? Many thanks. Bests.

@honghh2018
Copy link

@wangshisheng @ctrapnell @lizhaozhi
i had the same issue, had anyone could help us?
my R version was 4.2.0

Best

@honghh2018
Copy link

Had any advice for this issue ? @wangshisheng @ctrapnell @lizhaozhi
Many thanks,
Best

@yishan03
Copy link

The same issue here. @ctrapnell

@honghh2018
Copy link

honghh2018 commented Jun 12, 2022 via email

@44REAM
Copy link

44REAM commented Jun 16, 2022

I have the same problem, this is my solution.
I download monocle from https://www.bioconductor.org/packages/3.15/bioc/src/contrib/Archive/monocle/
And change the code in function project2MST() in order_cell.R file.

from

if(class(projection) != 'matrix')                 
    projection <- as.matrix(projection)

to

projection <- as.matrix(projection)

then install the package using install.packages("path to folder with the package", repos = NULL, type = "source")

hope this help

@lyuguol
Copy link

lyuguol commented Jun 17, 2022

I have the same problem, this is my solution. I download monocle from https://www.bioconductor.org/packages/3.15/bioc/src/contrib/Archive/monocle/ And change the code in function project2MST() in order_cell.R file.

from

if(class(projection) != 'matrix')                 
    projection <- as.matrix(projection)

to

projection <- as.matrix(projection)

then install the package using install.packages("path to folder with the package", repos = NULL, type = "source")

hope this help

Dear 44REAM,
Thank you. After changing the function, did you make a new archived packaged with 'tar -czf monocle_2.24.0.tar.gz monocle 2' to replace the original one and installed? or you installed the package with the unarchived folder containing the modified 'order_cell.R' 'install.packages("R_package/monocle 2", repos = NULL, type = "source")'?
I encountered the problem in installation....Could you show me more details about how you performed the installation?
Many thanks!
Guoliang

@MwGuo11
Copy link

MwGuo11 commented Jun 18, 2022

I have the same problem, too. Anyone could help? Thanks very much. Bests.

@MwGuo11
Copy link

MwGuo11 commented Jun 18, 2022

您好!已经收到邮件,祝好!                                    洪汉辉

您好,您的问题解决了吗,谢谢!

@lyuguol
Copy link

lyuguol commented Jun 19, 2022

Dear Hanhui,

Yes, the problem was perfectly solved by following 44REAM's solution, however, with a bit of modification when performing the last step of installation.

I quote the following solution again as a big thanks for 44REAM as well:

  1. download monocle from https://www.bioconductor.org/packages/3.15/bioc/src/contrib/Archive/monocle/
  2. decompress the package 'monocle_2.24.0.tar.gz', and get a 'monocle' folder.
  3. open the folder 'monocle/R', change the code in function 'project2MST()' in the 'order_cell.R' file:
    change from

if(class(projection) != 'matrix')
projection <- as.matrix(projection)

to

projection <- as.matrix(projection)

  1. save the 'order_cell.R' file.
  2. copy the 'monocle' folder and paste to the location where I usually install my packages.
  3. In R studio, using the command to load the 'monocle' folder:

devtools::load_all("path to the location/monocle")

7.Done. and managed to run the 'orderCells(cds)'.

Thank you and best,

Guoliang

@MwGuo11
Copy link

MwGuo11 commented Jun 20, 2022

Dear Hanhui,

Yes, the problem was perfectly solved by following 44REAM's solution, however, with a bit of modification when performing the last step of installation.

I quote the following solution again as a big thanks for 44REAM as well:

  1. download monocle from https://www.bioconductor.org/packages/3.15/bioc/src/contrib/Archive/monocle/
  2. decompress the package 'monocle_2.24.0.tar.gz', and get a 'monocle' folder.
  3. open the folder 'monocle/R', change the code in function 'project2MST()' in the 'order_cell.R' file:
    change from

if(class(projection) != 'matrix') projection <- as.matrix(projection)

to

projection <- as.matrix(projection)

  1. save the 'order_cell.R' file.
  2. copy the 'monocle' folder and paste to the location where I usually install my packages.
  3. In R studio, using the command to load the 'monocle' folder:

devtools::load_all("path to the location/monocle")

7.Done. and managed to run the 'orderCells(cds)'.

Thank you and best,

Guoliang

Thanks very much!

@patrickeboada
Copy link

patrickeboada commented Jun 21, 2022

Thank you @MwGuo11 & @44REAM for providing the edit to update the package.

I noticed that I could not rerun my monocle2 pipeline on the same data that I produced results from previously. It may be from updating my R to the latest version.

Now that I've utilized your update I can get past orderCells(). However, I cannot get retrieve BEAM() results.

`BEAM_res <- BEAM(monocle_cds, branch_point = 1, cores = 8)

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

I never returned this error before for BEAM(). Does anyone have any experience or input on this error?

@weu74lin
Copy link

Thank you @MwGuo11 & @44REAM for providing the edit to update the package.

I noticed that I could not rerun my monocle2 pipeline on the same data that I produced results from previously. It may be from updating my R to the latest version.

Now that I've utilized your update I can get past orderCells(). However, I cannot get retrieve BEAM() results.

`BEAM_res <- BEAM(monocle_cds, branch_point = 1, cores = 8)

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

I never returned this error before for BEAM(). Does anyone have any experience or input on this error?

I also have the same problem, I modified the code of / monocle/R /BEAM.R on the basis of 44REAM's solution.

from:

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

to:

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

@patrickeboada
Copy link

@weu74lin

Thank you for your advice on these edits.
This change corrected the error.

@patrickeboada
Copy link

patrickeboada commented Jun 23, 2022

@weu74lin great idea!

@yejingyu0628
Copy link

@weu74lin @44REAM Thanks very much!

@orange511
Copy link

Hi, I cannot get retrieve plot_genes_branched_heatmap() results.

plot_genes_branched_heatmap(mycds_sub_beam,
branch_point = 1,
num_clusters = 2,
show_rownames = T)

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

Does anyone have any experience or input on this error?

@hereFadeStar
Copy link

@orange511
it happened to me once when i set the parameter 'cores = 1' in this function. if you change to 2 or else, it will pass; if this doesn't work, you should find another solution.

@zy-fang
Copy link

zy-fang commented Nov 11, 2022

Hi, I cannot get retrieve plot_genes_branched_heatmap() results.

plot_genes_branched_heatmap(mycds_sub_beam, branch_point = 1, num_clusters = 2, show_rownames = T)

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

Does anyone have any experience or input on this error?

I met the same problem.

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

@hereFadeStar
Copy link

@zy-fang
thank you! it works after i modified that. And it fix the same error when i use plot_genes_branched_pseudotime. however, i still got some warning:

plot_genes_branched_heatmap(cds[row.names(subset(BEAM_res, qval < 1e-4)),],  branch_point = 1,  num_clusters = 4, 
                                   cores = 4,use_gene_short_name = T,  show_rownames = T)
Warning message:
In class(cellData) != "matrix" && isSparseMatrix(cellData) == FALSE : 'length(x) = 2 > 1' in coercion to 'logical(1)'

plot_genes_branched_pseudotime(cds[genes,], branch_point = 1, color_by = "State")
Warning messages:
1: In for (i in seq_len(differences)) r <- r[i1] - r[-length(r):-(length(r) -  :
  closing unused connection 6 (<-localhost:11964)
2: In for (i in seq_len(differences)) r <- r[i1] - r[-length(r):-(length(r) -  :
  closing unused connection 5 (<-localhost:11964)
3: In for (i in seq_len(differences)) r <- r[i1] - r[-length(r):-(length(r) -  :
  closing unused connection 4 (<-localhost:11964)
4: In for (i in seq_len(differences)) r <- r[i1] - r[-length(r):-(length(r) -  :
  closing unused connection 3 (<-localhost:11964)
5: In class(cellData) != "matrix" && isSparseMatrix(cellData) == FALSE :
  'length(x) = 2 > 1' in coercion to 'logical(1)'

Did these warning happen to you and should i ignore it? thank you very much!

@zy-fang
Copy link

zy-fang commented Nov 12, 2022

I think these warnings can be ignored.

In class(cellData) != "matrix" && isSparseMatrix(cellData) == FALSE :
'length(x) = 2 > 1' in coercion to 'logical(1)'.

This is because when cellData is a matrix, class(cellData) is going to be c("matrix", "array"). So the class(cellData) != "matrix" will be c(FALSE,TRUE). When do the “&&”at the end, only the first one (FALSE) is taken into account.

4: In for (i in seq_len(differences)) r <- r[i1] - r[-length(r):-(length(r) - :
closing unused connection 3 (<-localhost:11964)

This warning is about multiple core parallelism.

@hereFadeStar
Copy link

@zy-fang
Thank you for your advice and these details which help me a lot.

@Georgeguoql
Copy link

sc_cds <- newCellDataSet(

  • as.matrix(ct),
  • phenoData = pd,
  • featureData =fd,
  • expressionFamily = negbinomial.size(),
  • lowerDetectionLimit=1)
    Warning message:
    In class(cellData) != "matrix" && isSparseMatrix(cellData) == FALSE :
    'length(x) = 2 > 1' in coercion to 'logical(1)'
    I also meet this warnings when using the newCellDataSet function.
    Furthermore, when I run the following codes
    cds <- estimateSizeFactors(cds)
    Error in if (isSparseMatrix(counts)) { : the condition has length > 1

cds <- estimateDispersions(cds)
Error in .local(object, ...) :
NAs found in size factors. Have you called 'estimateSizeFactors'?
These error have made the analysis discontinued in the following steps.
Thank you for anyone who can solve these problems.

4 similar comments
@Georgeguoql
Copy link

sc_cds <- newCellDataSet(

  • as.matrix(ct),
  • phenoData = pd,
  • featureData =fd,
  • expressionFamily = negbinomial.size(),
  • lowerDetectionLimit=1)
    Warning message:
    In class(cellData) != "matrix" && isSparseMatrix(cellData) == FALSE :
    'length(x) = 2 > 1' in coercion to 'logical(1)'
    I also meet this warnings when using the newCellDataSet function.
    Furthermore, when I run the following codes
    cds <- estimateSizeFactors(cds)
    Error in if (isSparseMatrix(counts)) { : the condition has length > 1

cds <- estimateDispersions(cds)
Error in .local(object, ...) :
NAs found in size factors. Have you called 'estimateSizeFactors'?
These error have made the analysis discontinued in the following steps.
Thank you for anyone who can solve these problems.

@Georgeguoql
Copy link

sc_cds <- newCellDataSet(

  • as.matrix(ct),
  • phenoData = pd,
  • featureData =fd,
  • expressionFamily = negbinomial.size(),
  • lowerDetectionLimit=1)
    Warning message:
    In class(cellData) != "matrix" && isSparseMatrix(cellData) == FALSE :
    'length(x) = 2 > 1' in coercion to 'logical(1)'
    I also meet this warnings when using the newCellDataSet function.
    Furthermore, when I run the following codes
    cds <- estimateSizeFactors(cds)
    Error in if (isSparseMatrix(counts)) { : the condition has length > 1

cds <- estimateDispersions(cds)
Error in .local(object, ...) :
NAs found in size factors. Have you called 'estimateSizeFactors'?
These error have made the analysis discontinued in the following steps.
Thank you for anyone who can solve these problems.

@Georgeguoql
Copy link

sc_cds <- newCellDataSet(

  • as.matrix(ct),
  • phenoData = pd,
  • featureData =fd,
  • expressionFamily = negbinomial.size(),
  • lowerDetectionLimit=1)
    Warning message:
    In class(cellData) != "matrix" && isSparseMatrix(cellData) == FALSE :
    'length(x) = 2 > 1' in coercion to 'logical(1)'
    I also meet this warnings when using the newCellDataSet function.
    Furthermore, when I run the following codes
    cds <- estimateSizeFactors(cds)
    Error in if (isSparseMatrix(counts)) { : the condition has length > 1

cds <- estimateDispersions(cds)
Error in .local(object, ...) :
NAs found in size factors. Have you called 'estimateSizeFactors'?
These error have made the analysis discontinued in the following steps.
Thank you for anyone who can solve these problems.

@Georgeguoql
Copy link

sc_cds <- newCellDataSet(

  • as.matrix(ct),
  • phenoData = pd,
  • featureData =fd,
  • expressionFamily = negbinomial.size(),
  • lowerDetectionLimit=1)
    Warning message:
    In class(cellData) != "matrix" && isSparseMatrix(cellData) == FALSE :
    'length(x) = 2 > 1' in coercion to 'logical(1)'
    I also meet this warnings when using the newCellDataSet function.
    Furthermore, when I run the following codes
    cds <- estimateSizeFactors(cds)
    Error in if (isSparseMatrix(counts)) { : the condition has length > 1

cds <- estimateDispersions(cds)
Error in .local(object, ...) :
NAs found in size factors. Have you called 'estimateSizeFactors'?
These error have made the analysis discontinued in the following steps.
Thank you for anyone who can solve these problems.

@Georgeguoql
Copy link

sc_cds <- newCellDataSet(

  • as.matrix(ct),
  • phenoData = pd,
  • featureData =fd,
  • expressionFamily = negbinomial.size(),
  • lowerDetectionLimit=1)
    Warning message:
    In class(cellData) != "matrix" && isSparseMatrix(cellData) == FALSE :
    'length(x) = 2 > 1' in coercion to 'logical(1)'
    I also meet this warnings when using the newCellDataSet function.
    Furthermore, when I run the following codes
    cds <- estimateSizeFactors(cds)
    Error in if (isSparseMatrix(counts)) { : the condition has length > 1

cds <- estimateDispersions(cds)
Error in .local(object, ...) :
NAs found in size factors. Have you called 'estimateSizeFactors'?
These error have made the analysis discontinued in the following steps.
Thank you for anyone who can solve these problems.

5 similar comments
@Georgeguoql
Copy link

sc_cds <- newCellDataSet(

  • as.matrix(ct),
  • phenoData = pd,
  • featureData =fd,
  • expressionFamily = negbinomial.size(),
  • lowerDetectionLimit=1)
    Warning message:
    In class(cellData) != "matrix" && isSparseMatrix(cellData) == FALSE :
    'length(x) = 2 > 1' in coercion to 'logical(1)'
    I also meet this warnings when using the newCellDataSet function.
    Furthermore, when I run the following codes
    cds <- estimateSizeFactors(cds)
    Error in if (isSparseMatrix(counts)) { : the condition has length > 1

cds <- estimateDispersions(cds)
Error in .local(object, ...) :
NAs found in size factors. Have you called 'estimateSizeFactors'?
These error have made the analysis discontinued in the following steps.
Thank you for anyone who can solve these problems.

@Georgeguoql
Copy link

sc_cds <- newCellDataSet(

  • as.matrix(ct),
  • phenoData = pd,
  • featureData =fd,
  • expressionFamily = negbinomial.size(),
  • lowerDetectionLimit=1)
    Warning message:
    In class(cellData) != "matrix" && isSparseMatrix(cellData) == FALSE :
    'length(x) = 2 > 1' in coercion to 'logical(1)'
    I also meet this warnings when using the newCellDataSet function.
    Furthermore, when I run the following codes
    cds <- estimateSizeFactors(cds)
    Error in if (isSparseMatrix(counts)) { : the condition has length > 1

cds <- estimateDispersions(cds)
Error in .local(object, ...) :
NAs found in size factors. Have you called 'estimateSizeFactors'?
These error have made the analysis discontinued in the following steps.
Thank you for anyone who can solve these problems.

@Georgeguoql
Copy link

sc_cds <- newCellDataSet(

  • as.matrix(ct),
  • phenoData = pd,
  • featureData =fd,
  • expressionFamily = negbinomial.size(),
  • lowerDetectionLimit=1)
    Warning message:
    In class(cellData) != "matrix" && isSparseMatrix(cellData) == FALSE :
    'length(x) = 2 > 1' in coercion to 'logical(1)'
    I also meet this warnings when using the newCellDataSet function.
    Furthermore, when I run the following codes
    cds <- estimateSizeFactors(cds)
    Error in if (isSparseMatrix(counts)) { : the condition has length > 1

cds <- estimateDispersions(cds)
Error in .local(object, ...) :
NAs found in size factors. Have you called 'estimateSizeFactors'?
These error have made the analysis discontinued in the following steps.
Thank you for anyone who can solve these problems.

@Georgeguoql
Copy link

sc_cds <- newCellDataSet(

  • as.matrix(ct),
  • phenoData = pd,
  • featureData =fd,
  • expressionFamily = negbinomial.size(),
  • lowerDetectionLimit=1)
    Warning message:
    In class(cellData) != "matrix" && isSparseMatrix(cellData) == FALSE :
    'length(x) = 2 > 1' in coercion to 'logical(1)'
    I also meet this warnings when using the newCellDataSet function.
    Furthermore, when I run the following codes
    cds <- estimateSizeFactors(cds)
    Error in if (isSparseMatrix(counts)) { : the condition has length > 1

cds <- estimateDispersions(cds)
Error in .local(object, ...) :
NAs found in size factors. Have you called 'estimateSizeFactors'?
These error have made the analysis discontinued in the following steps.
Thank you for anyone who can solve these problems.

@Georgeguoql
Copy link

sc_cds <- newCellDataSet(

  • as.matrix(ct),
  • phenoData = pd,
  • featureData =fd,
  • expressionFamily = negbinomial.size(),
  • lowerDetectionLimit=1)
    Warning message:
    In class(cellData) != "matrix" && isSparseMatrix(cellData) == FALSE :
    'length(x) = 2 > 1' in coercion to 'logical(1)'
    I also meet this warnings when using the newCellDataSet function.
    Furthermore, when I run the following codes
    cds <- estimateSizeFactors(cds)
    Error in if (isSparseMatrix(counts)) { : the condition has length > 1

cds <- estimateDispersions(cds)
Error in .local(object, ...) :
NAs found in size factors. Have you called 'estimateSizeFactors'?
These error have made the analysis discontinued in the following steps.
Thank you for anyone who can solve these problems.

@vailin1992
Copy link

I attach a modified version of Monocle (2.26.0) according to the discussion. One can install it locally. I hope this one helps somebody.
monocle_2.26.0.tar.gz

@jehan-uhn
Copy link

I attach a modified version of Monocle (2.26.0) according to the discussion. One can install it locally. I hope this one helps somebody. monocle_2.26.0.tar.gz

You have my eternal gratitude, this was the most perfectly helpful thing it solved my issue with EstimateSizeFactors immediately.

@Georgeguoql
Copy link

Thank you all the guys! I have also updated the latest modifications which have changed the Beam.R code, which will help the monocle2 work well.
monocle_2.26.0.tar.gz

@ZivTQ
Copy link

ZivTQ commented Mar 10, 2023

I attach a modified version of Monocle (2.26.0) according to the discussion. One can install it locally. I hope this one helps somebody. monocle_2.26.0.tar.gz

Hi, have you accept this error in ordercell?:error in graph.adjacency.dense(adjmatrix, mode = mode, weighted = weighted, : long vectors not supported yet: ../../src/include/rinlinedfuns.h:537

@fpengstudy
Copy link

@ZivTQ
Hi, I met the same error, and I saw this problem in other issues in #138 .
I am trying to use monocle3 for my 50k cells. Have you fixed this problem yet?

@ZivTQ
Copy link

ZivTQ commented Mar 15, 2023 via email

@zr0719
Copy link

zr0719 commented Apr 10, 2023

I attach a modified version of Monocle (2.26.0) according to the discussion. One can install it locally. I hope this one helps somebody. monocle_2.26.0.tar.gz

I attach a modified version of Monocle (2.26.0) according to the discussion. One can install it locally. I hope this one helps somebody. monocle_2.26.0.tar.gz

Thanks you so much!

@zr0719
Copy link

zr0719 commented Apr 10, 2023

@zy-fang thank you! it works after i modified that. And it fix the same error when i use plot_genes_branched_pseudotime. however, i still got some warning:

plot_genes_branched_heatmap(cds[row.names(subset(BEAM_res, qval < 1e-4)),],  branch_point = 1,  num_clusters = 4, 
                                   cores = 4,use_gene_short_name = T,  show_rownames = T)
Warning message:
In class(cellData) != "matrix" && isSparseMatrix(cellData) == FALSE : 'length(x) = 2 > 1' in coercion to 'logical(1)'

plot_genes_branched_pseudotime(cds[genes,], branch_point = 1, color_by = "State")
Warning messages:
1: In for (i in seq_len(differences)) r <- r[i1] - r[-length(r):-(length(r) -  :
  closing unused connection 6 (<-localhost:11964)
2: In for (i in seq_len(differences)) r <- r[i1] - r[-length(r):-(length(r) -  :
  closing unused connection 5 (<-localhost:11964)
3: In for (i in seq_len(differences)) r <- r[i1] - r[-length(r):-(length(r) -  :
  closing unused connection 4 (<-localhost:11964)
4: In for (i in seq_len(differences)) r <- r[i1] - r[-length(r):-(length(r) -  :
  closing unused connection 3 (<-localhost:11964)
5: In class(cellData) != "matrix" && isSparseMatrix(cellData) == FALSE :
  'length(x) = 2 > 1' in coercion to 'logical(1)'

Did these warning happen to you and should i ignore it? thank you very much!
I met the same error when I run with HSMM[1:10,], but it turns to plot when I run with HSMM[c(1:5, 20:100),]. It's weird and I don't know why.

@XiongYuZhang
Copy link

I have the same problem, did you solve it? Error in if (class(projection) != "matrix") projection <- as.matrix(projection) : the condition has length > 1 此外: Warning message: In graph.dfs(dp_mst, root = root_cell, neimode = "all", unreachable = FALSE, : Argument neimode' is deprecated; use mode' instead

I also meet this error, I don't

I have the same problem, did you solve it? Error in if (class(projection) != "matrix") projection <- as.matrix(projection) : the condition has length > 1 此外: Warning message: In graph.dfs(dp_mst, root = root_cell, neimode = "all", unreachable = FALSE, : Argument neimode' is deprecated; use mode' instead

@XiongYuZhang
Copy link

How to modify the function projection2MST()? I can't find the codes of projection2MST function. I have download the monocle and found the orderCells and projection2MST(), but i can't find the raw codes of projection2MST.

@weu74lin
Copy link

How to modify the function projection2MST()? I can't find the codes of projection2MST function. I have download the monocle and found the orderCells and projection2MST(), but i can't find the raw codes of projection2MST.

You might want to unzip monocle_2.26.0.tar.gz, then look for orderCell.R in the monocle/R file and open modify projection2MST(), then re-zip the installation

@XiongYuZhang
Copy link

XiongYuZhang commented May 17, 2023 via email

@honghh2018
Copy link

thanks the @Georgeguoql, and in this step, i also modified the BEAM error
This was correct all above error package
hope it help
monocle_2.26.0.tar.gz

@boyaisagirl
Copy link

But I still meet the error when I run

beam_res <- BEAM(mycds[order.genes,], branch_point = 1, cores = 16)
Error in if (progenitor_method == "duplicate") { :
the condition has length > 1

Thank you all the guys! I have also updated the latest modifications which have changed the Beam.R code, which will help the monocle2 work well. monocle_2.26.0.tar.gz

@01010101110
Copy link

I attach a modified version of Monocle (2.26.0) according to the discussion. One can install it locally. I hope this one helps somebody. monocle_2.26.0.tar.gz

Thank you so much!! It help to the error which bothers me for such a long time !!!

@GWBHX-JJ
Copy link

trace('project2MST', edit = T, where = asNamespace("monocle")) 运行此句代码
然后
在弹出窗口中把 if (elass(projection) != "matrix") 注释,并保存,重新运行即可
这个问题是这个包遗留的历史问题,因为包的创作者更新包的速度太快了

@z-bluesky
Copy link

orderCells(HSMM_myo)
Error in if (class(projection) != "matrix") projection <- as.matrix(projection) :
the condition has length > 1
In addition: Warning message:
In graph.dfs(dp_mst, root = root_cell, neimode = "all", unreachable = FALSE, :
Argument neimode' is deprecated; use mode' instead
I also encountered the same problem, I uninstalled it and then installed v2.30 and solved it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests