I am trying to use distanceToNearest() to get the closest distance between two GRanges objects. The method usually works well but has been giving me an error (Error in new_Hits(Class, from, to, nLnode, nRnode, mcols) :
'nLnode' and 'nRnode' must be single integers) which I am not sure how to resolve.
distanceToNearest(myRanges1, myRanges2, ignore.strand=T)
Error in new_Hits(Class, from, to, nLnode, nRnode, mcols) :
'nLnode' and 'nRnode' must be single integers
myRanges1
GRanges object with 5547 ranges and 0 metadata columns:
seqnames ranges strand
<Rle> <IRanges> <Rle>
[1] chr1 [ 0, 0] *
[2] chr1 [ 300000, 300000] *
[3] chr1 [ 425000, 425000] *
[4] chr1 [ 800000, 800000] *
[5] chr1 [1875000, 1875000] *
... ... ... ...
myRanges2
GRanges object with 9535 ranges and 0 metadata columns:
seqnames ranges strand
<Rle> <IRanges> <Rle>
[1] chr1 [ 825000, 825000] *
[2] chr1 [144900000, 144900000] *
[3] chr1 [145000000, 145000000] *
[4] chr1 [145400000, 145400000] *
[5] chr1 [145650000, 145650000] *
... ... ... ...
Are your packages up-to-date and consistent, as reported by
BiocInstaller::biocValid()
?BiocInstaller::biocValid()
* sessionInfo()
R version 3.3.0 (2016-05-03)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.10.2 (Yosemite)
locale:
[1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8
attached base packages:
[1] stats4 parallel stats graphics grDevices utils datasets methods base
other attached packages:
[1] BiocInstaller_1.22.3 reshape_0.8.5 stringr_1.1.0 ggplot2_2.1.0 GenomicRanges_1.24.2
[6] GenomeInfoDb_1.8.5 IRanges_2.6.1 S4Vectors_0.10.3 BiocGenerics_0.18.0
loaded via a namespace (and not attached):
[1] Rcpp_0.12.6 digest_0.6.10 grid_3.3.0 plyr_1.8.4 gtable_0.2.0 magrittr_1.5
[7] scales_0.4.0 stringi_1.1.1 zlibbioc_1.18.0 reshape2_1.4.1 XVector_0.12.1 labeling_0.3
[13] tools_3.3.0 munsell_0.4.3 colorspace_1.2-6
* Out-of-date packages
Package
BSgenome.Hsapiens.UCSC.hg19 "BSgenome.Hsapiens.UCSC.hg19"
BSgenome.Hsapiens.UCSC.hg38 "BSgenome.Hsapiens.UCSC.hg38"
DO.db "DO.db"
IlluminaHumanMethylation450kanno.ilmn12.hg19 "IlluminaHumanMethylation450kanno.ilmn12.hg19"
IlluminaHumanMethylation450kmanifest "IlluminaHumanMethylation450kmanifest"
pd.hugene.1.0.st.v1 "pd.hugene.1.0.st.v1"
TxDb.Hsapiens.UCSC.hg19.knownGene "TxDb.Hsapiens.UCSC.hg19.knownGene"
TxDb.Hsapiens.UCSC.hg38.knownGene "TxDb.Hsapiens.UCSC.hg38.knownGene"
LibPath
BSgenome.Hsapiens.UCSC.hg19 "/Library/Frameworks/R.framework/Versions/3.3/Resources/library"
BSgenome.Hsapiens.UCSC.hg38 "/Library/Frameworks/R.framework/Versions/3.3/Resources/library"
DO.db "/Library/Frameworks/R.framework/Versions/3.3/Resources/library"
IlluminaHumanMethylation450kanno.ilmn12.hg19 "/Library/Frameworks/R.framework/Versions/3.3/Resources/library"
IlluminaHumanMethylation450kmanifest "/Library/Frameworks/R.framework/Versions/3.3/Resources/library"
pd.hugene.1.0.st.v1 "/Library/Frameworks/R.framework/Versions/3.3/Resources/library"
TxDb.Hsapiens.UCSC.hg19.knownGene "/Library/Frameworks/R.framework/Versions/3.3/Resources/library"
TxDb.Hsapiens.UCSC.hg38.knownGene "/Library/Frameworks/R.framework/Versions/3.3/Resources/library"
Installed Built ReposVer
BSgenome.Hsapiens.UCSC.hg19 "1.4.0" "3.2.2" "1.4.0"
BSgenome.Hsapiens.UCSC.hg38 "1.4.1" "3.2.2" "1.4.1"
DO.db "2.9" "3.2.2" "2.9"
IlluminaHumanMethylation450kanno.ilmn12.hg19 "0.2.1" "3.2.2" "0.2.1"
IlluminaHumanMethylation450kmanifest "0.4.0" "3.2.2" "0.4.0"
pd.hugene.1.0.st.v1 "3.14.1" "3.2.2" "3.14.1"
TxDb.Hsapiens.UCSC.hg19.knownGene "3.2.2" "3.2.2" "3.2.2"
TxDb.Hsapiens.UCSC.hg38.knownGene "3.1.3" "3.2.2" "3.1.3"
Repository
BSgenome.Hsapiens.UCSC.hg19 "https://bioconductor.org/packages/3.3/data/annotation/src/contrib"
BSgenome.Hsapiens.UCSC.hg38 "https://bioconductor.org/packages/3.3/data/annotation/src/contrib"
DO.db "https://bioconductor.org/packages/3.3/data/annotation/src/contrib"
IlluminaHumanMethylation450kanno.ilmn12.hg19 "https://bioconductor.org/packages/3.3/data/annotation/src/contrib"
IlluminaHumanMethylation450kmanifest "https://bioconductor.org/packages/3.3/data/annotation/src/contrib"
pd.hugene.1.0.st.v1 "https://bioconductor.org/packages/3.3/data/annotation/src/contrib"
TxDb.Hsapiens.UCSC.hg19.knownGene "https://bioconductor.org/packages/3.3/data/annotation/src/contrib"
TxDb.Hsapiens.UCSC.hg38.knownGene "https://bioconductor.org/packages/3.3/data/annotation/src/contrib"
update with biocLite()
Error: 8 package(s) out of date
biocLite isnt really updating the 8 packages
> biocLite()
BioC_mirror: https://bioconductor.org
Using Bioconductor 3.3 (BiocInstaller 1.22.3), R 3.3.0 (2016-05-03).
provide the package names requiring update as a vector,
biocLite(c("BSgenome.Hsapiens.UCSC.hg19", "BSgenome.Hsapiens.UCSC.hg38"))
, etc. but these are not likely to be the source of your problem so I'll leave it for others to answer.We need a reproducible example in order to help. If you still have this problem after updating with biocLite() please provide the GRanges (or a small subset) that produce the error. You can send to valerie.obenchain@roswellpark.org.
Valerie
I added it below.
Is there another way to find the closest GRanges object besides distanceToNearest()?
Thanks for the help!
Hi roladali,
I suspect there is something specific/unusual to your GRanges objects
myRanges1
andmyRanges2
that triggers this error. Could you please provide a reproducible example i.e. code that we can run that triggers this error? If you can't provide the code that generated the 2 GRanges objects maybe you can serialize them (withsave()
) and make the 2 resulting files available somewhere via an URL.Thanks,
H.
I added the objects below.
Thanks!