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 { : task 1 failed - "dimension of 'A' must be at least 3" #40

Open
meaksu opened this issue Jan 11, 2024 · 1 comment
Open

Comments

@meaksu
Copy link

meaksu commented Jan 11, 2024

Hi,
I'm getting a weird error and I'm not sure what could be causing it since I've run the same code on the same object previously with no errors. Do you know what could be causing this?

> re_ln = nebula(nebuladata$count, nebuladata$sid, pred=df, offset=nebuladata$offset, method='LN')
Remove  15323  genes having low expression.
Analyzing  16198  genes with  49  subjects and  108553  cells.
Error in { : task 1 failed - "dimension of 'A' must be at least 3"
> traceback()
6: stop(simpleError(msg, call = expr))
5: e$fun(obj, substitute(ex), parent.frame(), e$data)
4: (function (obj, ex) 
   {
       e <- getDoPar()
       e$fun(obj, substitute(ex), parent.frame(), e$data)
   })(structure(list(args = gid(.doRNG.stream = list(c(10407L, 220730650L, 
   -1488635949L, -1374262536L, -161857383L, 472285062L, -19665841L
   ), c(10407L, 560444745L, -1449673117L, 329269002L, -1373225926L, 
   -191104363L, -956007088L), c(10407L, -261277466L, -2118084130L, 
   1649378238L, 67990833L, -1279070037L, 188772905L), c(10407L, 
   -223684078L, -1818867022L, 1615198839L, -272343810L, 1794737318L, 
   1058720021L), c(10407L, 492047571L, -1596484842L, -760964706L, 
   1456602701L, 43415024L, -2070155503L), c(10407L, 1092576449L, 
   1743234594L, -2017218414L, 761191585L, -1459191673L, -2007975220L
   ), c(10407L, -1057075553L, 2059021047L, 1768162781L, -1590191593L, 
   -1834679500L, -1430620074L), c(10407L, 709041855L, -642880334L, 
   1543041301L, -1215006062L, 1983836141L, 1623775403L), c(10407L, 
   80649392L, -1899410628L, -380477119L, -1833639677L, 946607684L, 
   -1490667455L), c(10407L, -856805405L, -212980410L, -911654134L, 
   598016867L, 1602113084L, 953134033L), c(10407L, -961928782L, 
   -891978046L, -1209218494L, 427359974L, 873300585L, -1639542444L
    ...
3: do.call(`%dopar%`, list(obj, ex), envir = parent.frame())
2: foreach(i = gid, .combine = "cbind") %dorng% {
       posv = call_posindy(count, i - 1, nind)
       if ((posv$mct * mfs) < 3) {
           ord = 3
       }
       else {
           ord = 1
       }
       para = c(log(posv$mct) - moffset, rep(0, nb - 1))
       re_t = tryCatch({
           ref = switch(opt, lbfgs = lbfgs(c(para, 1, cell_init), 
               ptmg_ll_der, posindy = posv$posindy, X = pred, offset = offset, 
               Y = posv$Y, n_one = posv$n_onetwo, ytwo = posv$ytwo, 
               fid = fid, cumsumy = cumsumy[i, ], posind = posind[[i]], 
               nb = nb, k = k, nind = nind, lower = lower, upper = upper, 
               control = list(ftol_abs = eps)), trust = trust(objfun = ptmg_ll_der_hes3, 
               c(para, 0, 0), 2, 100, posindy = posv$posindy, X = pred, 
               offset = offset, Y = posv$Y, n_one = posv$n_onetwo, 
               ytwo = posv$ytwo, fid = fid, cumsumy = cumsumy[i, 
                   ], posind = posind[[i]], nb = nb, k = k, nind = nind), 
    ...
1: nebula(nebuladata$count, nebuladata$sid, pred = df, offset = nebuladata$offset, 
       method = "LN")
@lhe17
Copy link
Owner

lhe17 commented Jan 11, 2024 via email

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

2 participants