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 is.data.frame(x) : object 'mu' not found #30

Open
zji90 opened this issue Jun 18, 2021 · 4 comments
Open

Error in is.data.frame(x) : object 'mu' not found #30

zji90 opened this issue Jun 18, 2021 · 4 comments

Comments

@zji90
Copy link

zji90 commented Jun 18, 2021

Hi,

I encountered this issue when running saver:

Error in is.data.frame(x) : object 'mu' not found
Calls: saver ... calc.estimate -> do.call -> -> var -> is.data.frame
In addition: Warning message:
In if (!(grepl("matrix", class(x), ignore.case = TRUE))) { :
the condition has length > 1 and only the first element will be used
Execution halted

The code I used was:
res <- saver(d,ncores=detectCores(),size.factor=1)$estimate

Here d is a numeric matrix 15981 rows and 2796 columns. I have done library size normalization by myself so I set size.factor to be 1. I have checked the data and there is no NA values nor genes or cells with all zeroes. I wonder what is the potential cause of this problem? Thanks!

@mohuangx
Copy link
Owner

Hi, can you tell me if there are any output messages?

@Shawn10312
Copy link

Hi,

I confront the same error when I run saver(count, ncores = cores, size.factor = 1).

The log as following:

Finished 5037/19235 genes. Approximate finish time: 2021-07-16 10:06:31
Predicting remaining genes...
loaded SAVER and set parent environment
loaded SAVER and set parent environment
loaded SAVER and set parent environment
loaded SAVER and set parent environment
loaded SAVER and set parent environment
loaded SAVER and set parent environment
loaded SAVER and set parent environment
loaded SAVER and set parent environment
loaded SAVER and set parent environment
loaded SAVER and set parent environment
loaded SAVER and set parent environment
loaded SAVER and set parent environment
loaded SAVER and set parent environment
loaded SAVER and set parent environment
loaded SAVER and set parent environment
loaded SAVER and set parent environment
loaded SAVER and set parent environment
loaded SAVER and set parent environment
loaded SAVER and set parent environment
loaded SAVER and set parent environment
loaded SAVER and set parent environment
loaded SAVER and set parent environment
loaded SAVER and set parent environment
loaded SAVER and set parent environment
loaded SAVER and set parent environment
loaded SAVER and set parent environment
loaded SAVER and set parent environment
loaded SAVER and set parent environment
loaded SAVER and set parent environment
loaded SAVER and set parent environment
loaded SAVER and set parent environment
loaded SAVER and set parent environment
loaded SAVER and set parent environment
loaded SAVER and set parent environment
loaded SAVER and set parent environment
loaded SAVER and set parent environment
loaded SAVER and set parent environment
loaded SAVER and set parent environment
loaded SAVER and set parent environment
loaded SAVER and set parent environment
Error in is.data.frame(x) : object 'mu' not found
Calls: saver ... calc.estimate -> do.call -> <Anonymous> -> var -> is.data.frame
In addition: Warning message:
In clean.data(x) : Make sure x is numeric.
Execution halted

And I checked there is no NA in the count matrix.

Is there any missing information?

Best,

@Shawn10312
Copy link

I have searched the raw codes of saver, and learned the use of the coefficent 'mu' in saver .
But the mu was set the default NULL. Why does it still be applied in my running?

@mohuangx
Copy link
Owner

Hi, the mu parameter is used only when a user wants to specify the predictions. It is NULL if the predictions are to be estimated.

I think there may be an issue with your input. clean.data checks if there are any non-numeric entries in count. The warning means that there is at least one entry that is not numeric. Can you verify that your there are no non-numeric entries in count?

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

3 participants