Open bschilder opened 2 years 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.
- 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.
- 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.
- Did you post your log file? If not, add it now.
N/A
- 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.
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.
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
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")
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"
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
@bschilder - maybe this has something to do with the deprecation of DataFrame
in favor of DFrame
?
@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
@JING202 - does a traceback()
show anything? That might help me understand where the error is coming from.
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")
@rcorces Do you have more suggestions to figure it out?
were working on figuring this out. at the moment, the easiest solution is to use an earlier version of bioconductor/S4 vectors
@rcorces I downgraded R and Bioconductor version and it worked.
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
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.
@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.
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
@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"’
> 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
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
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.
Attach your log file None generated.
Describe the bug Error message produced when running
getTestProject
function.To Reproduce
Expected behavior Function runs without error and return
ArchR
test project.ScreenshotsConsole outputSession Info
Best, Brian