cole-trapnell-lab / monocle-release

280 stars 116 forks source link

Error in orderCells: 'from' contains NAs #518

Open rblame opened 2 months ago

rblame commented 2 months ago

I encountered an error while trying to use the orderCells function from the monocle package. The error message is as follows:

Error in sequence.default(n..1, from = seq.int(s.1, length(df), s.1), :
'from' contains NAs

Steps to Reproduce:

Load the monocle package:

library(monocle)

Load the RData file containing the CellDataSet object:

load("cds1.RData")

Attempt to run orderCells on the CellDataSet object:

cds <- orderCells(cds)

Expected Behavior:

The function should successfully order the cells based on the trajectory analysis without errors.

Actual Behavior:

The function throws an error indicating that 'from' contains NAs. This suggests that there may be missing values in the data that the function is unable to handle properly.

Data Example:

Unfortunately, I cannot provide the exact data due to its sensitivity and size, but it is a standard CellDataSet object used for single-cell trajectory analysis.

Environment:

R version: 4.4 monocle package version: 2.24 Operating System: Linux

whylassan commented 2 months ago

I got the same issue. No clues at all.

Alexxyz123 commented 2 months ago

I also found this problem, and I noticed that the warnings when I conduct
mycds <- estimateDispersions(mycds, cores=16) Removing 120 outliers

Warning messages: 1: group_by_() was deprecated in dplyr 0.7.0. ℹ Please use group_by() instead. ℹ See vignette('programming') for more help ℹ The deprecated feature was likely used in the monocle package. Please report the issue to the authors. This warning is displayed once every 8 hours. Call lifecycle::last_lifecycle_warnings() to see where this warning was generated. 2: select_() was deprecated in dplyr 0.7.0. ℹ Please use select() instead. ℹ The deprecated feature was likely used in the monocle package. Please report the issue to the authors. This warning is displayed once every 8 hours. Call lifecycle::last_lifecycle_warnings() to see where this warning was generated. 3: In log(ifelse(y == 0, 1, y/mu)) : NaNs produced 4: step size truncated due to divergence I wondering if this step produced NA for the ordercells?

huipan1973 commented 2 months ago

Same error. Any suggestion?

Alexxyz123 commented 2 months ago

No, I can't find the solution

Fugwaaaa commented 2 months ago

I have the same problem. Have you solved it?

huipan1973 commented 1 month ago

No, I haven't. I tried to filter genes and cells with more stringent cutoff. But I still got lots of NAs in the pseudotime estimation.

Alexxyz123 commented 1 month ago

Yes, I also filter genes and cells with more stringent cutoff. But also get the error. However another dataset did not meet this error. How can I check the difference between the two datasets. Maybe the names of samples afre not right? it should be "_" not "-"

Woohootakeoff commented 1 month ago

I had the same problem. I found that the error occurred on line 42 of the orderCell function "dp < -as.matrix (dist(t(P)))". There was an error when calculating dist. I am not sure if it is my data or the R package version. My version of R is 4.4.1, monocle 2.32.0, and stats 4.4.1.

P
Fugwaaaa commented 1 month ago

Thank you for your reply! I tried again later.Is it because there is too much data?I filter out some barcode about 60000 counts,but also Report the same error

---- Replied Message ---- | From | @.> | | Date | 09/30/2024 17:30 | | To | @.> | | Cc | @.>@.> | | Subject | Re: [cole-trapnell-lab/monocle-release] Error in orderCells: 'from' contains NAs (Issue #518) |

I had the same problem. I found that the error occurred on line 42 of the orderCell function "dp < -as.matrix (dist(t(P)))". There was an error when calculating dist. I am not sure if it is my data or the R package version. My version of R is 4.4.1, monocle 2.32.0, and stats 4.4.1. P.png (view on web)

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

rblame commented 1 month ago

Has any friend solved this problem?

Alexxyz123 commented 2 weeks ago

Anybody solved this problem?