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

Missing value OptimizeALS #263

Open
mtegtmey opened this issue Jun 6, 2022 · 4 comments
Open

Missing value OptimizeALS #263

mtegtmey opened this issue Jun 6, 2022 · 4 comments

Comments

@mtegtmey
Copy link

mtegtmey commented Jun 6, 2022

I use LIGER pretty regularly for integrating in vitro datasets with brain atlas data but came across this error I've not previously seen before. Any thoughts would be greatly appreciated! I don't have any missing values in my metadata, so the error is confusing me a bit.

Error in if (trim > 0 && n) {: missing value where TRUE/FALSE needed
Traceback:

  1. RunOptimizeALS(BICCN.hiAstro, k = 20, lambda = 5, split.by = "orig.ident")
  2. rliger::optimizeALS(object = scale.data, k = k, lambda = lambda,
    . thresh = thresh, max.iters = max.iters, nrep = nrep, H.init = H.init,
    . W.init = W.init, V.init = V.init, rand.seed = rand.seed,
    . print.obj = print.obj)
  3. optimizeALS.list(object = scale.data, k = k, lambda = lambda,
    . thresh = thresh, max.iters = max.iters, nrep = nrep, H.init = H.init,
    . W.init = W.init, V.init = V.init, rand.seed = rand.seed,
    . print.obj = print.obj)
  4. mean(obj0, obj)
  5. mean(obj0, obj)
  6. mean.default(obj0, obj)
@cgao90
Copy link
Collaborator

cgao90 commented Jul 14, 2022

Hi @mtegtmey ,

Sorry about the late reply. Have you resolved this issue yet? If not, do you mind sharing a code snippet where you ran into this issue?

Best,

@vivianlu63
Copy link

vivianlu63 commented Aug 30, 2022

Hello, I am running into this issue as well. I just ran

obj <- normalize(obj)  
obj <- selectGenes(obj)  
obj <- scaleNotCenter(obj)  
obj <- optimizeALS(obj, k = 20)  

@cgao90
Copy link
Collaborator

cgao90 commented Sep 13, 2022

Hi @vivianlu63 ,

NAs in the ligerObject@scale.data can cause the error reported above.

Best,

@lealealeal
Copy link

lealealeal commented Mar 8, 2023

Hello, I ran into the same issue reported above.
I already used liger in the past without this issue. My dataset is a sc-rna-seq datdaset made of several batches (55 batches, from 11 to 180 cells per batch).
As anyone been able to resolve the issue and could help me?
I have checked that I have no NAs in the ligerobject

Thanks, best

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