GreenleafLab / ArchR

ArchR : Analysis of Regulatory Chromatin in R (www.ArchRProject.com)
MIT License
377 stars 133 forks source link

`getTestProject`: Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘replaceCOLS’ for signature ‘"DataFrame"’ #1643

Open bschilder opened 1 year ago

bschilder commented 1 year ago

Attach your log file None generated.

Describe the bug Error message produced when running getTestProject function.

To Reproduce

library(ArchR)
proj <- ArchR::getTestProject()

Expected behavior Function runs without error and return ArchR test project.

Screenshots Console output

trying URL 'https://jeffgranja.s3.amazonaws.com/ArchR/TestData/PBMCSmall.zip'
Content type 'application/zip' length 114605742 bytes (109.3 MB)
==================================================
downloaded 109.3 MB

Setting default genome to Hg19test.
 Error in (function (classes, fdef, mtable) : 
unable to find an inherited method for function ‘replaceCOLS’ for signature ‘"DataFrame"’
13.
stop(gettextf("unable to find an inherited method for function %s for signature %s", 
sQuote(fdef@generic), sQuote(cnames)), domain = NA)
12.
(function (classes, fdef, mtable) 
{
methods <- .findInheritedMethods(classes, fdef, mtable)
if (length(methods) == 1L) ...
11.
replaceCOLS(x, i, value)
10.
`[<-`(`*tmp*`, i, value = new("DFrame", rownames = NULL, nrows = 1L, 
elementType = "ANY", elementMetadata = NULL, metadata = list(), 
listData = list(ArrowFiles = "/Users/schilder/Desktop/tipseeker/PBMCSmall/ArrowFiles/PBMCSmall.arrow")))
9.
`[<-`(`*tmp*`, i, value = new("DFrame", rownames = NULL, nrows = 1L, 
elementType = "ANY", elementMetadata = NULL, metadata = list(), 
listData = list(ArrowFiles = "/Users/schilder/Desktop/tipseeker/PBMCSmall/ArrowFiles/PBMCSmall.arrow")))
8.
.replace_list_element(x, i2, value)
7.
setListElement(x, i, value)
6.
setListElement(x, i, value)
5.
`[[<-`(`*tmp*`, name, value = "/Users/schilder/Desktop/tipseeker/PBMCSmall/ArrowFiles/PBMCSmall.arrow")
4.
`[[<-`(`*tmp*`, name, value = "/Users/schilder/Desktop/tipseeker/PBMCSmall/ArrowFiles/PBMCSmall.arrow")
3.
`$<-`(`*tmp*`, "ArrowFiles", value = "/Users/schilder/Desktop/tipseeker/PBMCSmall/ArrowFiles/PBMCSmall.arrow")
2.
loadArchRProject("PBMCSmall")
1.
ArchR::getTestProject()

Session Info

``` R version 4.2.1 (2022-06-23) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS Monterey 12.4 Matrix products: default LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib Random number generation: RNG: L'Ecuyer-CMRG Normal: Inversion Sample: Rejection locale: [1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8 attached base packages: [1] stats4 grid stats graphics grDevices utils datasets methods base other attached packages: [1] rhdf5_2.41.1 SummarizedExperiment_1.27.3 Biobase_2.57.1 MatrixGenerics_1.9.1 [5] Rcpp_1.0.9 Matrix_1.5-1 GenomicRanges_1.49.1 GenomeInfoDb_1.33.7 [9] IRanges_2.31.2 S4Vectors_0.35.4 BiocGenerics_0.43.4 matrixStats_0.62.0 [13] data.table_1.14.2 stringr_1.4.1 plyr_1.8.7 magrittr_2.0.3 [17] ggplot2_3.3.6 gtable_0.3.1 gtools_3.9.3 gridExtra_2.3 [21] ArchR_1.0.2 loaded via a namespace (and not attached): [1] rappdirs_0.3.3 rtracklayer_1.57.0 [3] scattermore_0.8 SeuratObject_4.1.2 [5] tidyr_1.2.1 bit64_4.0.5 [7] knitr_1.40 irlba_2.3.5 [9] DelayedArray_0.23.2 rpart_4.1.16 [11] KEGGREST_1.37.3 RCurl_1.98-1.8 [13] generics_0.1.3 GenomicFeatures_1.49.7 [15] cowplot_1.1.1 RSQLite_2.2.17 [17] shadowtext_0.1.2 RANN_2.6.1 [19] future_1.28.0 BSgenome.Hsapiens.UCSC.hg19_1.4.3 [21] bit_4.0.4 tzdb_0.3.0 [23] enrichplot_1.17.2 spatstat.data_2.2-0 [25] xml2_1.3.3 httpuv_1.6.6 [27] assertthat_0.2.1 viridis_0.6.2 [29] xfun_0.33 hms_1.1.2 [31] evaluate_0.16 promises_1.2.0.1 [33] fansi_1.0.3 restfulr_0.0.15 [35] progress_1.2.2 caTools_1.18.2 [37] dbplyr_2.2.1 igraph_1.3.5 [39] DBI_1.1.3 geneplotter_1.75.0 [41] htmlwidgets_1.5.4 spatstat.geom_2.4-0 [43] purrr_0.3.4 ellipsis_0.3.2 [45] dplyr_1.0.10 annotate_1.75.0 [47] gridBase_0.4-7 biomaRt_2.53.2 [49] deldir_1.0-6 vctrs_0.4.1 [51] Cairo_1.6-0 ROCR_1.0-11 [53] abind_1.4-5 cachem_1.0.6 [55] withr_2.5.0 ggforce_0.3.4 [57] BSgenome_1.65.2 genomation_1.29.0 [59] progressr_0.11.0 sctransform_0.3.5 [61] GenomicAlignments_1.33.1 treeio_1.21.2 [63] prettyunits_1.1.1 goftest_1.2-3 [65] cluster_2.1.4 DOSE_3.23.2 [67] ape_5.6-2 lazyeval_0.2.2 [69] crayon_1.5.1 genefilter_1.79.0 [71] pkgconfig_2.0.3 tweenr_2.0.2 [73] nlme_3.1-159 rlang_1.0.6 [75] globals_0.16.1 lifecycle_1.0.2 [77] miniUI_0.1.1.1 filelock_1.0.2 [79] BiocFileCache_2.5.0 seqPattern_1.29.0 [81] AnnotationHub_3.5.1 polyclip_1.10-0 [83] lmtest_0.9-40 aplot_0.1.7 [85] Rhdf5lib_1.19.2 boot_1.3-28 [87] zoo_1.8-11 ggridges_0.5.4 [89] png_0.1-7 viridisLite_0.4.1 [91] rjson_0.2.21 bitops_1.0-7 [93] rhdf5filters_1.9.0 KernSmooth_2.23-20 [95] Biostrings_2.65.6 blob_1.2.3 [97] qvalue_2.29.0 parallelly_1.32.1 [99] spatstat.random_2.2-0 readr_2.1.2 [101] gridGraphics_0.5-1 scales_1.2.1 [103] memoise_2.0.1 ica_1.0-3 [105] gplots_3.1.3 zlibbioc_1.43.0 [107] compiler_4.2.1 scatterpie_0.1.8 [109] BiocIO_1.7.1 RColorBrewer_1.1-3 [111] plotrix_3.8-2 DESeq2_1.37.6 [113] fitdistrplus_1.1-8 Rsamtools_2.13.4 [115] cli_3.4.1 XVector_0.37.1 [117] listenv_0.8.0 patchwork_1.1.2 [119] pbapply_1.5-0 mgcv_1.8-40 [121] MASS_7.3-58.1 tidyselect_1.1.2 [123] stringi_1.7.8 yaml_2.3.5 [125] GOSemSim_2.23.0 locfit_1.5-9.6 [127] ggrepel_0.9.1 fastmatch_1.1-3 [129] tools_4.2.1 future.apply_1.9.1 [131] parallel_4.2.1 rstudioapi_0.14 [133] TxDb.Hsapiens.UCSC.hg19.knownGene_3.2.2 BRGenomics_1.9.0 [135] farver_2.1.1 Rtsne_0.16 [137] ggraph_2.0.6 digest_0.6.29 [139] BiocManager_1.30.18 rgeos_0.5-9 [141] shiny_1.7.2 BiocVersion_3.16.0 [143] later_1.3.0 RcppAnnoy_0.0.19 [145] httr_1.4.4 AnnotationDbi_1.59.1 [147] colorspace_2.0-3 XML_3.99-0.10 [149] tensor_1.5 reticulate_1.26 [151] splines_4.2.1 uwot_0.1.14 [153] yulab.utils_0.0.5 RcppRoll_0.3.0 [155] tidytree_0.4.1 spatstat.utils_2.3-1 [157] EpiCompare_1.1.1 graphlayouts_0.8.1 [159] sp_1.5-0 ggplotify_0.1.0 [161] plotly_4.10.0 xtable_1.8-4 [163] jsonlite_1.8.0 ggtree_3.5.3 [165] tidygraph_1.2.2 ggfun_0.0.7 [167] R6_2.5.1 pillar_1.8.1 [169] htmltools_0.5.3 mime_0.12 [171] glue_1.6.2 fastmap_1.1.0 [173] BiocParallel_1.31.12 interactiveDisplayBase_1.35.0 [175] codetools_0.2-18 ChIPseeker_1.33.2 [177] fgsea_1.23.2 Signac_1.8.0 [179] utf8_1.2.2 lattice_0.20-45 [181] spatstat.sparse_2.1-1 tibble_3.1.8 [183] curl_4.3.2 leiden_0.4.3 [185] GO.db_3.15.0 survival_3.4-0 [187] rmarkdown_2.16 munsell_0.5.0 [189] DO.db_2.9 GenomeInfoDbData_1.2.8 [191] impute_1.71.0 reshape2_1.4.4 [193] spatstat.core_2.4-4 Seurat_4.2.0 ```

Best, Brian

rcorces commented 1 year ago

Hi @bschilder! Thanks for using ArchR! Please make sure that your post belongs in the Issues section. Only bugs and error reports belong in the Issues section. Usage questions and feature requests should be posted in the Discussions section, not in Issues.
Before we help you, you must respond to the following questions unless your original post already contained this information: 1. If you've encountered an error, have you already searched previous Issues to make sure that this hasn't already been solved? 2. Can you recapitulate your error using the tutorial code and dataset? If so, provide a reproducible example. 3. Did you post your log file? If not, add it now. 4. Remove any screenshots that contain text and instead copy and paste the text using markdown's codeblock syntax (three consecutive backticks). You can do this by editing your original post.

bschilder commented 1 year ago
  1. If you've encountered an error, have you already searched previous Issues to make sure that this hasn't already been solved?

Indeed, couldn't find anything similar.

  1. Can you recapitulate your error using the tutorial code and dataset? If so, provide a reproducible example.

Yes, it's using the example code/data described in the documentation.

  1. Did you post your log file? If not, add it now.

N/A

  1. Remove any screenshots that contain text and instead copy and paste the text using markdown's codeblock syntax (three consecutive backticks). You can do this by editing your original post.

Done.

rcorces commented 1 year ago

Maybe this is a problem with some update to the bioconductor package S4Vectors. You appear to be using a very new version (i.e. newer than the default on bioconductor)? Can you downgrade, at least to 0.34.0 and try again?

I'm still using 0.32.4 and this function works fine for me.

bschilder commented 1 year ago

Thanks @rcorces. This seems likely, though the reason I'm using the devel version of Bioc is because it's going to become the release version fairly soon. In anticipation of this, I'm developing an R package on the devel version of Bioc. https://bioconductor.org/developers/release-schedule/

S4Vectors devel appears to be passing all checks on Bioconductor at the moment, so it may be an issue with how the updates are interacting with ArchR. Since this will be an issue for most users pretty soon, would you mind checking out if there's a way to modify ArchR to accommodate these updates?

Side note, for my packages I find it helpful to launch GitHub Actions with Docker containers based on the devel version of Bioc. This means I can be ahead of the curve when any potential conflicts. If you find it helpful, I've made a GHA workflow template you can use here: https://github.com/neurogenomics/r_workflows

And also here implemented as part of a R package template: https://github.com/neurogenomics/templateR

rcorces commented 1 year ago

Thanks. Those look like very helpful resources.

I dont see anything in the traceback that would indicate that this is an ArchR problem. It looks like all of the problematic function calls are coming from within S4vectors, starting with setListElement.

What happens when you type showMethods(replaceCOLS) in your version?

> showMethods(replaceCOLS)
Function: replaceCOLS (package S4Vectors)
x="DataFrame"
x="DFrame"
    (inherited from: x="DataFrame")
bschilder commented 1 year ago

What happens when you type showMethods(replaceCOLS) in your version?

> showMethods(replaceCOLS)
Function: replaceCOLS (package S4Vectors)
x="DataFrame"
x="DFrame"
    (inherited from: x="DataFrame")
> showMethods(replaceCOLS)
Function: replaceCOLS (package S4Vectors)
x="DFrame"
rcorces commented 1 year ago

This function is very basic and as far as I can tell is only calling base-R functions so I just dont think there is anything for me to do here. Maybe you can manually step through the code to figure out which function is the problem. If its a base-R function or something fundamental, then I dont have any way to fix that and its probably a bioconductor issue. https://github.com/GreenleafLab/ArchR/blob/f6c0388bd37023400794c9ae8562ad69e3ba9fd7/R/InputData.R#L166-L184

rcorces commented 1 year ago

@bschilder - maybe this has something to do with the deprecation of DataFrame in favor of DFrame?

JING202 commented 1 year ago

@rcorces I met the same issue.

> proj <- ArchR::getTestProject()
trying URL 'https://jeffgranja.s3.amazonaws.com/ArchR/TestData/PBMCSmall.zip'
Content type 'application/zip' length 114605742 bytes (109.3 MB)
==================================================
downloaded 109.3 MB

BSgenome for hg19 not installed! Now installing by the following:
    BiocManager::install("BSgenome.Hsapiens.UCSC.hg19")
'getOption("repos")' replaces Bioconductor standard repositories, see '?repositories' for details

replacement repositories:
    CRAN: https://cran.rstudio.com/

Bioconductor version 3.15 (BiocManager 1.30.18), R 4.2.1 (2022-06-23)
Installing package(s) 'BSgenome.Hsapiens.UCSC.hg19'
installing the source package ‘BSgenome.Hsapiens.UCSC.hg19’

trying URL 'https://bioconductor.org/packages/3.15/data/annotation/src/contrib/BSgenome.Hsapiens.UCSC.hg19_1.4.3.tar.gz'
Content type 'application/x-gzip' length 710245413 bytes (677.3 MB)
==================================================
downloaded 677.3 MB

* installing *source* package ‘BSgenome.Hsapiens.UCSC.hg19’ ...
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (BSgenome.Hsapiens.UCSC.hg19)

The downloaded source packages are in
    ‘/private/var/folders/wb/j4cm9d3152lfvrf7p91srqrw0000gn/T/RtmploKQvP/downloaded_packages’
Setting default genome to Hg19test.
Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘replaceCOLS’ for signature ‘"DataFrame"’

I also tried to see what happens when typing showMethods(replaceCOLS).

> showMethods(replaceCOLS)
Function: replaceCOLS (package S4Vectors)
x="DFrame"

S4Vectors version: 0.34.0 R version: 4.2.1 ArchR version: 1.0.2

rcorces commented 1 year ago

@JING202 - does a traceback() show anything? That might help me understand where the error is coming from.

JING202 commented 1 year ago

Please see below. @rcorces Does it need S4Vector version0.22.1?

> traceback()
5: stop(.msg(...), call. = call.)
4: .stop(txt)
3: ifelse(.is_CRAN_check(), .message(txt), .stop(txt))
2: .version_validate(version)
1: BiocManager::install("S4Vectors", version = "0.22.1")
JING202 commented 1 year ago

@rcorces Do you have more suggestions to figure it out?

rcorces commented 1 year ago

were working on figuring this out. at the moment, the easiest solution is to use an earlier version of bioconductor/S4 vectors

JING202 commented 1 year ago

@rcorces I downgraded R and Bioconductor version and it worked.

R4.0.5

Bioconductor 3.11

MacOS Big Sur Version 11.7

GrafZahl1234 commented 1 year ago

I also got the loading issue. I went step by step through the code in https://github.com/GreenleafLab/ArchR/issues/1643#issuecomment-1258390306 and the problematic line is "loadArchRProject("PBMCSmall")". Up to there, the file downloads and unpacks perfectly. The strange thing is that I never had Issues loading a project before. I tried the more verbose code I use when loading in my other project (loadArchRProject(path = "./PBMCSmall/", force = FALSE, showLogo = TRUE) and get the same issue:

Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘replaceCOLS’ for signature ‘"DataFrame"’

So it might be something with how the project was saved.

library(ArchR)

                                               / |
                                             /    \
        .                                  /      |.
        \\\                              /        |.
          \\\                          /           `|.
            \\\                      /              |.
              \                    /                |\
              \\#####\           /                  ||
            ==###########>      /                   ||
             \\##==......\    /                     ||
        ______ =       =|__ /__                     ||      \\\
    ,--' ,----`-,__ ___/'  --,-`-===================##========>
   \               '        ##_______ _____ ,--,__,=##,__   ///
    ,    __==    ___,-,__,--'#'  ==='      `-'    | ##,-/
    -,____,---'       \\####\\________________,--\\_##,/
       ___      .______        ______  __    __  .______      
      /   \     |   _  \      /      ||  |  |  | |   _  \     
     /  ^  \    |  |_)  |    |  ,----'|  |__|  | |  |_)  |    
    /  /_\  \   |      /     |  |     |   __   | |      /     
   /  _____  \  |  |\  \\___ |  `----.|  |  |  | |  |\  \\___.
  /__/     \__\ | _| `._____| \______||__|  |__| | _| `._____|

ArchR : Version 1.0.2 For more information see our website : www.ArchRProject.com If you encounter a bug please report : https://github.com/GreenleafLab/ArchR/issues Loading Required Packages... Loading Package : grid v4.2.2 Loading Package : gridExtra v2.3 Loading Package : gtools v3.9.3 Loading Package : gtable v0.3.1 Loading Package : ggplot2 v3.4.0 Loading Package : magrittr v2.0.3 Loading Package : plyr v1.8.7 Loading Package : stringr v1.4.1 Loading Package : data.table v1.14.4 Loading Package : matrixStats v0.62.0 Loading Package : S4Vectors v0.36.0 Loading Package : GenomicRanges v1.50.1 Loading Package : BiocGenerics v0.44.0 Loading Package : Matrix v1.5.1 Loading Package : Rcpp v1.0.9 Loading Package : SummarizedExperiment v1.28.0 Loading Package : rhdf5 v2.42.0

rcorces commented 1 year ago

Just to update this - this is going to be a larger issue now that Bioconductor 3.16 is live. I do believe this is related to the gradual deprecation of DataFrame in favor of DFrame. At the moment, I dont have a solution other than to use an earlier version of Bioconductor.

rcorces commented 1 year ago

@bschilder - I know this post is very stale. I was recently trying to dig into this more but started by using the most up-to-date versions of R and BioConductor (working in R 4.3.0 and BioC 3.17). In that environment, I'm no longer able to reproduce this error. I'm not sure why that would be the case but this seems to have been fixed. If anyone is willing to test this on their end, that would be greatly appreciated.

TauHHCC commented 1 year ago

Hi Have you finally solved this issue? I got same issue what I tried to load a save Arch project that shared from my colleague using Anto<-loadArchRProject(path = "/wrk/data/.../ArchR_Total/", force = FALSE, showLogo = TRUE). I got Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘replaceCOLS’ for signature ‘"DataFrame"’ the traceback()

13: stop(gettextf("unable to find an inherited method for function %s for signature %s", 
        sQuote(fdef@generic), sQuote(cnames)), domain = NA)
12: (function (classes, fdef, mtable) 
    {
        methods <- .findInheritedMethods(classes, fdef, mtable)
        if (length(methods) == 1L) 
            return(methods[[1L]])
        else if (length(methods) == 0L) {
            cnames <- paste0("\"", vapply(classes, as.character, 
                ""), "\"", collapse = ", ")
            stop(gettextf("unable to find an inherited method for function %s for signature %s", 
                sQuote(fdef@generic), sQuote(cnames)), domain = NA)
        }
        else stop("Internal error in finding inherited methods; didn't return a unique method", 
            domain = NA)
    })(list(structure("DataFrame", package = "S4Vectors")), new("standardGeneric", 
        .Data = function (x, i, value) 
        standardGeneric("replaceCOLS"), generic = structure("replaceCOLS", package = "S4Vectors"), 
        package = "S4Vectors", group = list(), valueClass = character(0), 
        signature = c("x", "i"), default = NULL, skeleton = (function (x, 
            i, value) 
        stop(gettextf("invalid call in method dispatch to '%s' (no default method)", 
     ...
11: replaceCOLS(x, i, value)
10: `[<-`(`*tmp*`, i, value = new("DFrame", rownames = NULL, nrows = 1L, 
        elementType = "ANY", elementMetadata = NULL, metadata = list(), 
        listData = list(ArrowFiles = "/wrk/data/gastruloid/fromAntonio/Gastruloid_ArchR_TotalIntegrated_BEA/ArrowFiles/scATAC_Total.arrow")))
9: `[<-`(`*tmp*`, i, value = new("DFrame", rownames = NULL, nrows = 1L, 
       elementType = "ANY", elementMetadata = NULL, metadata = list(), 
       listData = list(ArrowFiles = "/wrk/data/gastruloid/fromAntonio/Gastruloid_ArchR_TotalIntegrated_BEA/ArrowFiles/scATAC_Total.arrow")))
8: .replace_list_element(x, i2, value)
7: setListElement(x, i, value)
6: setListElement(x, i, value)
5: `[[<-`(`*tmp*`, name, value = "/wrk/data/gastruloid/fromAntonio/Gastruloid_ArchR_TotalIntegrated_BEA/ArrowFiles/scATAC_Total.arrow")
4: `[[<-`(`*tmp*`, name, value = "/wrk/data/gastruloid/fromAntonio/Gastruloid_ArchR_TotalIntegrated_BEA/ArrowFiles/scATAC_Total.arrow")
3: `$<-`(`*tmp*`, "ArrowFiles", value = "/wrk/data/gastruloid/fromAntonio/Gastruloid_ArchR_TotalIntegrated_BEA/ArrowFiles/scATAC_Total.arrow")
2: `$<-`(`*tmp*`, "ArrowFiles", value = "/wrk/data/gastruloid/fromAntonio/Gastruloid_ArchR_TotalIntegrated_BEA/ArrowFiles/scATAC_Total.arrow")
1: loadArchRProject(path = "/wrk/data/gastruloid/fromAntonio/Gastruloid_ArchR_TotalIntegrated_BEA/", 
       force = FALSE, showLogo = TRUE)

I am working in R 4.3.0 and BioC 3.17.

> showMethods(replaceCOLS)
Function: replaceCOLS (package S4Vectors)
x="DFrame"

> packageVersion('S4Vectors')
[1] ‘0.38.1’
```   But I once tried lower version, it still did not work.

Could you please help have a look?

Best,
Taul
bschilder commented 10 months ago

@rcorces I've just checked and it appears this is still an issue in Bioc 3.18

> library(ArchR)

                                                   / |
                                                 /    \
            .                                  /      |.
            \\\                              /        |.
              \\\                          /           `|.
                \\\                      /              |.
                  \                    /                |\
                  \\#####\           /                  ||
                ==###########>      /                   ||
                 \\##==......\    /                     ||
            ______ =       =|__ /__                     ||      \\\
        ,--' ,----`-,__ ___/'  --,-`-===================##========>
       \               '        ##_______ _____ ,--,__,=##,__   ///
        ,    __==    ___,-,__,--'#'  ==='      `-'    | ##,-/
        -,____,---'       \\####\\________________,--\\_##,/
           ___      .______        ______  __    __  .______      
          /   \     |   _  \      /      ||  |  |  | |   _  \     
         /  ^  \    |  |_)  |    |  ,----'|  |__|  | |  |_)  |    
        /  /_\  \   |      /     |  |     |   __   | |      /     
       /  _____  \  |  |\  \\___ |  `----.|  |  |  | |  |\  \\___.
      /__/     \__\ | _| `._____| \______||__|  |__| | _| `._____|

ArchR : Version 1.0.2
For more information see our website : www.ArchRProject.com
If you encounter a bug please report : https://github.com/GreenleafLab/ArchR/issues
Loading Required Packages...
    Loading Package : grid v4.3.1
    Loading Package : gridExtra v2.3
    Loading Package : gtools v3.9.4
    Loading Package : gtable v0.3.4
    Loading Package : ggplot2 v3.4.4
    Loading Package : magrittr v2.0.3
    Loading Package : plyr v1.8.9
    Loading Package : stringr v1.5.1
    Loading Package : data.table v1.14.8
    Loading Package : matrixStats v1.1.0
    Loading Package : S4Vectors v0.40.1
    Loading Package : GenomicRanges v1.54.1
    Loading Package : BiocGenerics v0.48.1
    Loading Package : Matrix v1.6.1.1
    Loading Package : Rcpp v1.0.11
    Loading Package : SummarizedExperiment v1.32.0
    Loading Package : rhdf5 v2.46.0
Setting default number of Parallel threads to 6.
Warning message:
package ‘GenomeInfoDb’ was built under R version 4.3.2 
> proj <- ArchR::getTestProject()
trying URL 'https://jeffgranja.s3.amazonaws.com/ArchR/TestData/PBMCSmall.zip'
Content type 'application/zip' length 114605742 bytes (109.3 MB)
==================================================
downloaded 109.3 MB

Setting default genome to Hg19test.
Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘replaceCOLS’ for signature ‘"DataFrame"’

Session info

> BiocManager::version()
[1] ‘3.18’
> sessionInfo()
R version 4.3.1 (2023-06-16)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Sonoma 14.1

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 
LAPACK: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRlapack.dylib;  LAPACK version 3.11.0

Random number generation:
 RNG:     L'Ecuyer-CMRG 
 Normal:  Inversion 
 Sample:  Rejection 

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

time zone: Europe/London
tzcode source: internal

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

other attached packages:
 [1] rhdf5_2.46.0                SummarizedExperiment_1.32.0 Biobase_2.62.0             
 [4] MatrixGenerics_1.14.0       Rcpp_1.0.11                 Matrix_1.6-1.1             
 [7] GenomicRanges_1.54.1        GenomeInfoDb_1.38.1         IRanges_2.36.0             
[10] S4Vectors_0.40.1            BiocGenerics_0.48.1         matrixStats_1.1.0          
[13] data.table_1.14.8           stringr_1.5.1               plyr_1.8.9                 
[16] magrittr_2.0.3              ggplot2_3.4.4               gtable_0.3.4               
[19] gtools_3.9.4                gridExtra_2.3               ArchR_1.0.2                

loaded via a namespace (and not attached):
 [1] rjson_0.2.21                      lattice_0.22-5                   
 [3] Cairo_1.6-1                       rhdf5filters_1.14.1              
 [5] vctrs_0.6.4                       tools_4.3.1                      
 [7] bitops_1.0-7                      generics_0.1.3                   
 [9] parallel_4.3.1                    tibble_3.2.1                     
[11] fansi_1.0.5                       pkgconfig_2.0.3                  
[13] BSgenome_1.70.1                   lifecycle_1.0.4                  
[15] GenomeInfoDbData_1.2.11           compiler_4.3.1                   
[17] Rsamtools_2.18.0                  Biostrings_2.70.1                
[19] munsell_0.5.0                     codetools_0.2-19                 
[21] RCurl_1.98-1.13                   yaml_2.3.7                       
[23] pillar_1.9.0                      crayon_1.5.2                     
[25] BiocParallel_1.36.0               DelayedArray_0.28.0              
[27] abind_1.4-5                       tidyselect_1.2.0                 
[29] stringi_1.8.1                     dplyr_1.1.3                      
[31] restfulr_0.0.15                   colorspace_2.1-0                 
[33] cli_3.6.1                         BSgenome.Hsapiens.UCSC.hg19_1.4.3
[35] SparseArray_1.2.2                 S4Arrays_1.2.0                   
[37] XML_3.99-0.15                     utf8_1.2.4                       
[39] withr_2.5.2                       scales_1.2.1                     
[41] XVector_0.42.0                    BiocIO_1.12.0                    
[43] rtracklayer_1.62.0                rlang_1.1.2                      
[45] glue_1.6.2                        rstudioapi_0.15.0                
[47] R6_2.5.1                          Rhdf5lib_1.24.0                  
[49] GenomicAlignments_1.38.0          zlibbioc_1.48.0   
markphillippebworth commented 4 months ago

I found a reproducible example of this error: https://nubes.helmholtz-berlin.de/s/wqg6tmX4fW7pci5

And updated packages do not solve the issues. After downloading the ArchR Projects from this publication, I found that I could not load the ArchR project due to the same error.

The same error occured for both ArchR Projects.

It's possible that there's a versioning issue when loading an older ArchR Project ?

R version 4.3.3 (2024-02-29) Platform: x86_64-conda-linux-gnu (64-bit) Running under: Ubuntu 20.04.6 LTS

Matrix products: default BLAS/LAPACK: /home/jupyter/env/Basic/lib/libopenblasp-r0.3.26.so; LAPACK version 3.12.0

Random number generation: RNG: L'Ecuyer-CMRG Normal: Inversion Sample: Rejection

locale: [1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8
[4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8
[7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C

time zone: Etc/UTC tzcode source: system (glibc)

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

other attached packages: [1] rhdf5_2.46.1 SummarizedExperiment_1.32.0 [3] Biobase_2.62.0 MatrixGenerics_1.14.0
[5] Rcpp_1.0.12 Matrix_1.6-5
[7] GenomicRanges_1.54.1 GenomeInfoDb_1.38.8
[9] IRanges_2.36.0 S4Vectors_0.40.2
[11] BiocGenerics_0.48.1 matrixStats_1.2.0
[13] data.table_1.15.2 stringr_1.5.1
[15] plyr_1.8.9 magrittr_2.0.3
[17] ggplot2_3.5.0 gtable_0.3.4
[19] gtools_3.9.5 gridExtra_2.3
[21] ArchR_1.0.2

loaded via a namespace (and not attached): [1] utf8_1.2.4 generics_0.1.3 SparseArray_1.2.4
[4] bitops_1.0-7 stringi_1.8.3 lattice_0.22-5
[7] fansi_1.0.6 scales_1.3.0 abind_1.4-5
[10] cli_3.6.2 rlang_1.1.3 crayon_1.5.2
[13] XVector_0.42.0 munsell_0.5.0 withr_3.0.0
[16] DelayedArray_0.28.0 S4Arrays_1.2.1 parallel_4.3.3
[19] tools_4.3.3 dplyr_1.1.4 colorspace_2.1-0
[22] Rhdf5lib_1.24.2 GenomeInfoDbData_1.2.11 vctrs_0.6.5
[25] R6_2.5.1 lifecycle_1.0.4 zlibbioc_1.48.2
[28] pkgconfig_2.0.3 pillar_1.9.0 glue_1.7.0
[31] tibble_3.2.1 tidyselect_1.2.1 rhdf5filters_1.14.1
[34] Cairo_1.6-2 compiler_4.3.3 RCurl_1.98-1.14

rcorces commented 4 months ago

That is an interesting development to this problem and probably explains why I stopped being able to reproduce this error. There must be something about ArchRProject objects created with older versions of bioconductor that makes them incompatible with newer versions of bioconductor. I dont have bandwidth to fix this but hopefully we will have a dedicated developer that can pick this up soon. Thanks for reporting.