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

Computing gene models (unable to find an inherited method for function ‘ranges’ for signature ‘"SortedByQueryHits"’) #7

Open
AMChalkie opened this issue Jan 29, 2019 · 2 comments

Comments

@AMChalkie
Copy link

Hi,

Thanks for the package. I've just come up against the following error when running goldmine. Thinks were working fine a while ago, so it might be related to changes in another class.

Cheers
/Alistair

trying URL 'http://hgdownload.cse.ucsc.edu/goldenPath/mm10/database/refFlat.txt.gz'
Content type 'application/x-gzip' length 4015306 bytes (3.8 MB)

downloaded 3.8 MB

trying URL 'http://hgdownload.cse.ucsc.edu/goldenPath/mm10/database/refFlat.sql'
Content type 'text/plain; charset=UTF-8' length 1754 bytes

downloaded 1754 bytes

Computing gene models
Generating context annotation - genes
Error in (function (classes, fdef, mtable) :
unable to find an inherited method for function ‘ranges’ for signature ‘"SortedByQueryHits"’
Called from: (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("SortedByQueryHits"), new("standardGeneric", .Data = function (x,
use.names = TRUE, use.mcols = FALSE, ...)
standardGeneric("ranges"), generic = "ranges", package = "IRanges",
group = list(), valueClass = character(0), signature = "x",
default = NULL, skeleton = (function (x, use.names = TRUE,
use.mcols = FALSE, ...)
stop("invalid call in method dispatch to 'ranges' (no default method)",
domain = NA))(x, use.names, use.mcols, ...)), )
Browse[1]> dim(data.annotated)
Error during wrapup: object 'data.annotated' not found
Browse[1]>
R.3.5.2.>
R.3.5.2.>traceback()
11: stop(gettextf("unable to find an inherited method for function %s for signature %s",
sQuote(fdef@generic), sQuote(cnames)), domain = NA)
10: (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("SortedByQueryHits"), new("standardGeneric", .Data = function (x,
use.names = TRUE, use.mcols = FALSE, ...)
standardGeneric("ranges"), generic = "ranges", package = "IRanges",
group = list(), valueClass = character(0), signature = "x",
default = NULL, skeleton = (function (x, use.names = TRUE,
use.mcols = FALSE, ...)
stop("invalid call in method dispatch to 'ranges' (no default method)",
domain = NA))(x, use.names, use.mcols, ...)), )
9: ranges(overlaps.fo, ranges(query.gr), ranges(subject.gr)) at annotate.r#518
8: goldmine:::calcPercentOverlap(query.gr, reduce(x)) at annotate.r#46
7: FUN(X[[i]], ...)
6: lapply(genemodels, function(x) goldmine:::calcPercentOverlap(query.gr,
reduce(x)))
5: lapply(genemodels, function(x) goldmine:::calcPercentOverlap(query.gr,
reduce(x))) at annotate.r#46
4: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
3: suppressWarnings(lapply(genemodels, function(x) goldmine:::calcPercentOverlap(query.gr,
reduce(x)))) at annotate.r#46
2: goldmine(query = query, genes = getGenes("refseq", genome = genome,
cachedir), genome = genome, cachedir = cachedir) at

R.3.5.2.>sessionInfo()
R version 3.5.2 (2018-12-20)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS High Sierra 10.13.6

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib

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

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

other attached packages:
[1] usethis_1.4.0 devtools_2.0.1 goldmine_1.0 ggplot2_3.1.0 stringr_1.3.1 GenomicRanges_1.34.0 GenomeInfoDb_1.18.1 IRanges_2.16.0 S4Vectors_0.20.1 BiocGenerics_0.28.0
[11] data.table_1.11.8

loaded via a namespace (and not attached):
[1] tidyselect_0.2.5 remotes_2.0.2 purrr_0.2.5 testthat_2.0.1 colorspace_1.3-2 yaml_2.2.0 base64enc_0.1-3 rlang_0.3.0.1
[9] pkgbuild_1.0.2 R.oo_1.22.0 pillar_1.3.0 glue_1.3.0 withr_2.1.2 R.utils_2.7.0 sessioninfo_1.1.1 bindrcpp_0.2.2
[17] GenomeInfoDbData_1.2.0 bindr_0.1.1 plyr_1.8.4 zlibbioc_1.28.0 munsell_0.5.0 gtable_0.2.0 R.methodsS3_1.7.1 memoise_1.1.0
[25] callr_3.0.0 ps_1.2.1 curl_3.2 Rcpp_1.0.0 backports_1.1.2 scales_1.0.0 desc_1.2.0 pkgload_1.0.2
[33] XVector_0.22.0 fs_1.2.6 digest_0.6.18 stringi_1.2.4 processx_3.2.1 dplyr_0.7.8 alistairsRfunctions_0.046 grid_3.5.2
[41] rprojroot_1.3-2 cli_1.0.1 tools_3.5.2 bitops_1.0-6 magrittr_1.5 lazyeval_0.2.1 RCurl_1.95-4.11 tibble_1.4.2
[49] crayon_1.3.4 pkgconfig_2.0.2 prettyunits_1.0.2 assertthat_0.2.0 httr_1.3.1 rstudioapi_0.8 R6_2.3.0 compiler_3.5.2

@AMChalkie AMChalkie changed the title unable to find an inherited method for function ‘ranges’ for signature ‘"SortedByQueryHits"’ Computing gene models (unable to find an inherited method for function ‘ranges’ for signature ‘"SortedByQueryHits"’) Jan 29, 2019
@ghost
Copy link

ghost commented Feb 21, 2020

Hi AMChalkie,
Have you found a solution for the error? I've got the same error, too.

Thanks in advance.

@AMChalkie
Copy link
Author

AMChalkie commented Jan 19, 2023

Fixed on https://github.com/AMChalkie/goldmine [and subsequently messed up again... still working on it]
(Essentially findOverlaps -> GRanges::findOverlaps)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant