Bioconductor/BiocGenerics

BiocGenerics::unlist creating an error

Closed this issue · 3 comments

Hi @hpages, the latest changes of BiocGenerics seems to cause a common error across many packages in the dev build server (see https://bioconductor.org/checkResults/3.16/bioc-LATEST/crisprDesign/nebbiolo2-buildsrc.html for instance)

Error: processing vignette 'intro.Rmd' failed with diagnostics:
error in evaluating the argument 'x' in selecting a method for function 'as.matrix': dims [product 42] do not match the length of object [7]
--- failed re-building ‘intro.Rmd’

That error arises from BiocGenerics::unlist used in the crisprDesign package. Here's a simple reproducible example:

library(BiocGenerics)
library(S4Vectors)
df <- DataFrame(a=1:2, b=1:2)
df <- split(df, f=df$b)
BiocGenerics::unlist(df)

with output

> unlist(df)
DataFrame with 2 rows and 2 columns
Error in h(simpleError(msg, call)) : 
  error in evaluating the argument 'x' in selecting a method for function 'as.matrix': dims [product 4] do not match the length of object [2]

My sessionInfo:

R version 4.2.1 (2022-06-23)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Catalina 10.15.7

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats4    stats     graphics  grDevices utils     datasets  methods  
[8] base     

other attached packages:
[1] S4Vectors_0.35.3    BiocGenerics_0.43.2

loaded via a namespace (and not attached):
[1] compiler_4.2.1 IRanges_2.31.2

This was fixed yesterday (in BiocGenerics 0.43.3) and the error should go away on today's build report.

Thanks @hpages !