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

Function Not Found Error #328

Closed
DarioS opened this issue May 20, 2024 · 3 comments
Closed

Function Not Found Error #328

DarioS opened this issue May 20, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@DarioS
Copy link

DarioS commented May 20, 2024

I am exploring the mixed model functionality. It seems as though there might be a missing function import from BiocParallel.

> class(MILOdata)
  "Milo"
> head(design) # P: primary, M: metastasis.
           SampleID Smoker
HN118_P     HN118_P     No
OSCC_12-P OSCC_12-P     No
OSCC_16-P OSCC_16-P    Yes
OSCC_16-M OSCC_16-M    Yes
OSCC_20-P OSCC_20-P     No
OSCC_22-P OSCC_22-P    Yes
> testNhoods(MILOdata, design = ~ Smoker + (1|SampleID), design.df = design, fdr.weighting = "graph-overlap")
  Random effects found
  Using TMM normalisation
  Running GLMM model - this may take a few minutes
  Error in bpstopOnError(new("SerialParam", .xData = <environment>)) : 
    could not find function "bpstopOnError"

I am hoping to avoid spurious neighbourhoods with cells originating from only one sample, e.g. John Marioni et al. 2024

image

@MikeDMorgan MikeDMorgan added the bug Something isn't working label May 21, 2024
@MikeDMorgan
Copy link
Member

Hi @DarioS - thanks for flagging - for now you can add library(BiocParallel) to your code to resolve this issue.

@MikeDMorgan
Copy link
Member

Hi @DarioS - could you check if the latest master-branch version fixes your issue?

@DarioS
Copy link
Author

DarioS commented May 22, 2024

I used devtools' install_github which succeeded. But, reloading the package didn't solve it. So, I loaded BiocParallel.

library(BiocParallel)
Running GLMM model - this may take a few minutes
Error in testNhoods(MILOdata, design = ~Smoker + (1 | Sample), design.df = design[!is.na(design$Smoker),  : 
  Lowest traceback returned: 5: handle_error(e)
4: h(simpleError(msg, call))
3: .handleSimpleError(function (e) 
   {
       annotated_condition <- handle_error(e)
       stop(annotated_condition)
   }, "argument is of length zero", base::quote(if (!glmm.control$solver %in% 
       c("HE", "Fisher", "HE-NNLS")) {
       stop(glmm.control$solver, " not recognised - must be HE, HE-NNLS or Fisher")
   }))
2: fitGLMM(X = Xmodel, Z = Zmodel, y = Y[i, ], offsets = off.sets, 
       random.levels = randlevels, REML = reml, dispersion = disper[i], 
       geno.only = genonly, Kin = kinship, glmm.control = glmm.contr)
1: FUN(...)

It is hard for users to read but I realised that glmm.solver is mandatory if a formula contains |. Perhaps an is.null check?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants