Entering edit mode
Jeremiah Degenhardt
▴
50
@jeremiah-degenhardt-4417
Last seen 10.2 years ago
Hello Bioconductor,
I am trying to use the function precede() with two GRanges objects to
find
the closest element from gr1 to an element in gr2. precede() shows
that it
should work with a GRanges object, however, when I try to use it it
returns
only a vector of "NA".
Pasted below is a simplified bit of code to reproduce the error and my
session info.
Additionally, it would be even nicer if the function nearest() were
implemented for a GRanges object.
Thanks in advance for the help
Jeremiah
> gr1 <- GRanges("chr1", IRanges(1,10))
> gr2<- GRanges("chr1", IRanges(20,30))
> precede(gr2, gr1)
[1] NA
>
> sessionInfo()
R version 2.13.0 Under development (unstable) (2010-12-07 r53809)
Platform: x86_64-unknown-linux-gnu (64-bit)
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=C 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] grid stats graphics grDevices utils datasets
methods
[8] base
other attached packages:
[1] motifRG_0.0.2 rtracklayer_1.11.8 RCurl_1.5-0
[4] bitops_1.0-4.1 seqLogo_1.17.0 chipseq_1.1.2
[7] ShortRead_1.9.8 Rsamtools_1.3.11 lattice_0.18-3
[10] BSgenome_1.19.2 Biostrings_2.19.2 GenomicRanges_1.3.5
[13] IRanges_1.9.16 multicore_0.1-3
loaded via a namespace (and not attached):
[1] Biobase_2.11.6 hwriter_1.3 tools_2.13.0 XML_3.2-0
[[alternative HTML version deleted]]