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 while ((it <- it + 1) < limit && abs(del) > eps) { : missing value where TRUE/FALSE needed #76

Closed
nasjr08 opened this issue Oct 20, 2020 · 8 comments

Comments

@nasjr08
Copy link

nasjr08 commented Oct 20, 2020

I have recently started analysing my sc data and I got this error. I have been following a non-Seurat workflow where instead I use the SingleCellExperiment package to create an sce object (SingleCellExperiment() function) and did some filtering including low library size ,cells, low feature count and high mito percentage. ... I tried using the vst() function for variance stabilizing transformation on the data and got the above error.

The traceback output was:

stop(condition)
10.
signalConditions(obj, exclude = getOption("future.relay.immediate", "immediateCondition"), resignal = resignal, ...)
9.
signalConditionsASAP(obj, resignal = FALSE, pos = ii)
8.
resolve.list(y, result = TRUE, stdout = stdout, signal = signal, force = TRUE)
7.
resolve(y, result = TRUE, stdout = stdout, signal = signal, force = TRUE)
6.
value.list(fs)
5.
value(fs)
4.
future_xapply(FUN = FUN, nX = nX, chunk_args = X, args = list(...), get_chunk = [, expr = expr, envir = envir, future.globals = future.globals, future.packages = future.packages, future.scheduling = future.scheduling, future.chunk.size = future.chunk.size, future.stdout = future.stdout, ...
3.
future_lapply(X = index_lst, FUN = function(indices) { umi_bin_worker <- umi_bin[indices, , drop = FALSE] if (method == "poisson") { return(fit_poisson(umi = umi_bin_worker, model_str = model_str, ...
2.
get_model_pars(genes_step1, bin_size, umi, model_str, cells_step1, method, data_step1, theta_given, theta_estimation_fun, verbosity)
1.
sctransform::vst(counts, latent_var = c("log_umi"), return_gene_attr = TRUE, return_cell_attr = TRUE, verbosity = 0)

This was performed on the raw counts prior to any other normalization.

@ChristophH
Copy link
Collaborator

Please install the develop version of sctransform and try again remotes::install_github("ChristophH/sctransform@develop").
If you continue to run into this problem, please share a reproducible example, so I can have a look at it. In the meantime you can also try method = 'qpoisson' or method = 'glmGamPoi' in your call to vst().

@aheilbut
Copy link

aheilbut commented Nov 2, 2020

I have run into the same issue (on 0.3, 0.3.1, and on the development version). Strangely (or not), it seems to be dataset dependent. Changing the method to "qpoisson" does seem to work.

@ChristophH
Copy link
Collaborator

@aheilbut Could you share a reproducible example, so I can have a look at what the problem is?

@nasjr08
Copy link
Author

nasjr08 commented Nov 3, 2020

Hi Christoph,

Thank you for the recommendations. I ended up not doing an a variance stabilising transformation in my data and di d a different normalization method. However, at the time I did try method = 'qpoisson' and that did work, but I was unsure whether there are any caveats for using this method over the default setting. is anything I need consider prior to applying such a method over normal the normal poisson method?

Cheers,
Naseer

@jamesc1312
Copy link

I've tried to install the develop version of sctransform at
remotes::install_github("ChristophH/sctransform@develop")
but get
Error: Failed to install 'sctransform' from GitHub:
(converted from warning) installation of package ‘/var/folders/tb/89z033f528xgxz7608qy970m0000gn/T//RtmplcZUQ9/filea3a846c2f4f2/sctransform_0.3.1.9002.tar.gz’ had non-zero exit status

@ChristophH
Copy link
Collaborator

@jamesc1312 Please open a new issue and post the full output of the install command

@ChristophH
Copy link
Collaborator

@nasjr08 There is nothing wrong with using the qpoisson or glmGamPoi methods. In fact, I would recommend them over the default (poisson) because they are faster. Results are very similar. poisson has remained the default for backwards compatibility.

@nasjr08
Copy link
Author

nasjr08 commented Nov 6, 2020

Thank you @ChristophH, much appreciated.

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

4 participants