Entering edit mode
Hello,
promoters()
fails on GPos
objects; is that expected? If yes, maybe the error message could be made more friendly, for instance by suggesting to use promoters(GRanges(x))
.
> gpos1a <- GPos(seqnames=Rle(c("chr1", "chr2", "chr1"), c(10, 6, 4)),
+ pos=c(44:53, 5:10, 2:5))
> gpos1a
UnstitchedGPos object with 20 positions and 0 metadata columns:
seqnames pos strand
<Rle> <integer> <Rle>
[1] chr1 44 *
[2] chr1 45 *
[3] chr1 46 *
[4] chr1 47 *
[5] chr1 48 *
... ... ... ...
[16] chr2 10 *
[17] chr1 2 *
[18] chr1 3 *
[19] chr1 4 *
[20] chr1 5 *
-------
seqinfo: 2 sequences from an unspecified genome; no seqlengths
> promoters(gpos1a)
Error in (function (classes, fdef, mtable) :
unable to find an inherited method for function ‘update_ranges’ for signature ‘"UnstitchedIPos"’
> sessionInfo()
R Under development (unstable) (2021-10-27 r81107)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux bookworm/sid
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.10.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.10.0
locale:
[1] LC_CTYPE=en_GB.UTF-8 LC_NUMERIC=C LC_TIME=en_GB.UTF-8 LC_COLLATE=en_GB.UTF-8 LC_MONETARY=en_GB.UTF-8 LC_MESSAGES=en_GB.UTF-8
[7] LC_PAPER=en_GB.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats4 stats graphics grDevices utils datasets methods base
other attached packages:
[1] GenomicRanges_1.47.4 GenomeInfoDb_1.31.1 IRanges_2.29.0 S4Vectors_0.33.2 BiocGenerics_0.41.1
loaded via a namespace (and not attached):
[1] zlibbioc_1.41.0 compiler_4.2.0 XVector_0.35.0 tools_4.2.0 GenomeInfoDbData_1.2.7 RCurl_1.98-1.5 bitops_1.0-7
Have a nice day,
Charles