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

Error in orderCells: 'from' contains NAs #518

Open
rblame opened this issue Sep 9, 2024 · 11 comments
Open

Error in orderCells: 'from' contains NAs #518

rblame opened this issue Sep 9, 2024 · 11 comments

Comments

@rblame
Copy link

rblame commented Sep 9, 2024

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
Copy link

I got the same issue.
No clues at all.

@Alexxyz123
Copy link

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
Copy link

Same error. Any suggestion?

@Alexxyz123
Copy link

No, I can't find the solution

@Fugwaaaa
Copy link

I have the same problem. Have you solved it?

@huipan1973
Copy link

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
Copy link

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
Copy link

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
Copy link

Fugwaaaa commented Sep 30, 2024 via email

@rblame
Copy link
Author

rblame commented Oct 11, 2024

Has any friend solved this problem?

@Alexxyz123
Copy link

Anybody solved this problem?

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

6 participants