S4Vectors
S4Vectors copied to clipboard
List extraction via `[` is failing due to downstream `updateObject` call
Hi, I seem to have hit a bug in S4Vectors for objects that extend SimpleList
. Attempting to subset the list via [
extraction is now returning an error in Bioconductor 3.10, due to a downstream issue with BiocGenerics::updateObject(x, check = FALSE)
being called internally.
Here's an example:
## https://github.com/acidgenomics/pfgsea
data(gsea, package = "pfgsea")
class(gsea)
## [1] "FGSEAList"
## attr(,"package")
## [1] "pfgsea
Let's take a look at the S4 class structure, which extends SimpleList
:
showClass("FGSEAList")
Class "FGSEAList" [package "pfgsea"]
Slots:
Name: listData elementType elementMetadata metadata
Class: list character DataTable_OR_NULL list
Extends:
Class "SimpleList", directly
Class "List", by class "SimpleList", distance 2
Class "Vector", by class "SimpleList", distance 3
Class "list_OR_List", by class "SimpleList", distance 3
Class "Annotated", by class "SimpleList", distance 4
Class "vector_OR_Vector", by class "SimpleList", distance 4
This example object only has 1 element, but the same error returns for similar objects with multiple elements defined in the list.
length(gsea)
## [1] 1
Extraction of a single element via [[
works as expected.
gsea[[1]]
However, an attempt to subset the list via [
currently errors out.
gsea[1]
Error in .local(object, ...) : unused argument (check = FALSE)
Calls: [ ... extractROWS -> extractROWS -> updateObject -> updateObject
Backtrace:
█
1. ├─gsea[1]
2. └─gsea[1]
3. └─S4Vectors:::subset_along_ROWS(x, i, drop = drop)
4. ├─S4Vectors::extractROWS(x, i)
5. └─S4Vectors::extractROWS(x, i)
6. ├─BiocGenerics::updateObject(x, check = FALSE)
7. └─pfgsea::updateObject(x, check = FALSE)
I'm not seeing this error when I don't have an updateObject
method defined for the object.
Here's my session info via utils::sessionInfo()
:
> sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: Red Hat Enterprise Linux
Matrix products: default
BLAS/LAPACK: /usr/lib64/libopenblas-r0.3.3.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] pfgsea_0.1.15 basejump_0.11.21 bb8_0.2.2
loaded via a namespace (and not attached):
[1] fgsea_1.12.0 colorspace_1.4-1
[3] grr_0.9.5 ggridges_0.5.1
[5] htmlTable_1.13.2 XVector_0.26.0
[7] GenomicRanges_1.38.0 base64enc_0.1-3
[9] rstudioapi_0.10 ggrepel_0.8.1
[11] bit64_0.9-7 interactiveDisplayBase_1.24.0
[13] AnnotationDbi_1.48.0 splines_3.6.1
[15] R.methodsS3_1.7.1 goalie_0.4.0
[17] geneplotter_1.64.0 knitr_1.25
[19] zeallot_0.1.0 Formula_1.2-3
[21] Rsamtools_2.2.0 annotate_1.64.0
[23] freerange_0.2.8 cluster_2.1.0
[25] dbplyr_1.4.2 R.oo_1.23.0
[27] pheatmap_1.0.12 shiny_1.4.0
[29] BiocManager_1.30.9 compiler_3.6.1
[31] httr_1.4.1 backports_1.1.5
[33] assertthat_0.2.1 Matrix_1.2-17
[35] fastmap_1.0.1 lazyeval_0.2.2
[37] acidbase_0.1.1 cli_1.1.0
[39] later_1.0.0 acepack_1.4.1
[41] htmltools_0.4.0 prettyunits_1.0.2
[43] tools_3.6.1 gtable_0.3.0
[45] glue_1.3.1 GenomeInfoDbData_1.2.2
[47] transformer_0.2.10 dplyr_0.8.3
[49] acidplots_0.2.16 rappdirs_0.3.1
[51] fastmatch_1.1-0 Rcpp_1.0.2
[53] Biobase_2.46.0 vctrs_0.2.0
[55] Biostrings_2.54.0 rtracklayer_1.46.0
[57] xfun_0.10 stringr_1.4.0
[59] brio_0.3.15 syntactic_0.3.2
[61] mime_0.7 ensembldb_2.10.0
[63] XML_3.98-1.20 AnnotationHub_2.18.0
[65] zlibbioc_1.32.0 scales_1.0.0
[67] hms_0.5.2 promises_1.1.0
[69] ProtGenerics_1.18.0 parallel_3.6.1
[71] SummarizedExperiment_1.16.0 AnnotationFilter_1.10.0
[73] RColorBrewer_1.1-2 SingleCellExperiment_1.8.0
[75] yaml_2.2.0 curl_4.2
[77] gridExtra_2.3 memoise_1.1.0
[79] UpSetR_1.4.0 ggplot2_3.2.1
[81] Matrix.utils_0.9.7 rpart_4.1-15
[83] biomaRt_2.42.0 latticeExtra_0.6-28
[85] stringi_1.4.3 RSQLite_2.1.2
[87] genefilter_1.68.0 BiocVersion_3.10.1
[89] S4Vectors_0.24.0 checkmate_1.9.4
[91] GenomicFeatures_1.38.0 BiocGenerics_0.32.0
[93] BiocParallel_1.20.0 GenomeInfoDb_1.22.0
[95] rlang_0.4.1 pkgconfig_2.0.3
[97] matrixStats_0.55.0 bitops_1.0-6
[99] lattice_0.20-38 purrr_0.3.3
[101] htmlwidgets_1.5.1 GenomicAlignments_1.22.0
[103] cowplot_1.0.0 bit_1.1-14
[105] tidyselect_0.2.5 plyr_1.8.4
[107] magrittr_1.5 DESeq2_1.26.0
[109] R6_2.4.0 IRanges_2.20.0
[111] Hmisc_4.2-0 DelayedArray_0.12.0
[113] DBI_1.0.0 pillar_1.4.2
[115] foreign_0.8-72 withr_2.1.2
[117] survival_3.1-6 RCurl_1.95-4.12
[119] nnet_7.3-12 tibble_2.1.3
[121] crayon_1.3.4 BiocFileCache_1.10.0
[123] progress_1.2.2 locfit_1.5-9.1
[125] grid_3.6.1 data.table_1.12.6
[127] blob_1.2.0 bioverbs_0.2.10
[129] digest_0.6.22 xtable_1.8-4
[131] httpuv_1.5.2 DESeqAnalysis_0.2.10
[133] R.utils_2.9.0 openssl_1.4.1
[135] stats4_3.6.1 munsell_0.5.0
[137] sessioninfo_1.1.1 askpass_1.1