Hello everyone,
I am having a problem here trying to import a BigWig - from what I could find so far its seems that this function does not ran in windows. if that is the case, what alternatives do I have to import BigWig?
The error is this one
Error in .local(con, format, text, ...) : UCSC library operation failed In addition: Warning message: In .local(con, format, text, ...) : Invalid argument lseek(5, 421489092, invalid 'whence' value (551224928)) failed
The code I ran is below.
Thank you very much,
Be safe, Leonardo
library(rtracklayer)
library(AnnotationHub)
ahub <- AnnotationHub() # snapshotDate() 2019-10-29
qahub <- query(ahub,c('H3K27me3', 'E003','fc.signal'))
fc <- qahub[[1]]
which <- GRanges(seqnames = "chr22", ranges=IRanges(1,51304566)) # size chr22 = 51304566
rtracklayer::import(fc, which = which)
sessionInfo()
*R version 3.6.3 (2020-02-29)
Platform: i386-w64-mingw32/i386 (32-bit)
Running under: Windows 10 x64 (build 18363)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] parallel stats4 stats graphics grDevices utils datasets methods base
other attached packages:
[1] AnnotationHub_2.18.0 BiocFileCache_1.10.2 dbplyr_1.4.2 rtracklayer_1.46.0
[5] GenomicRanges_1.38.0 GenomeInfoDb_1.22.0 IRanges_2.20.2 S4Vectors_0.24.3
[9] BiocGenerics_0.32.0
loaded via a namespace (and not attached):
[1] rstudioapi_0.11 magrittr_1.5 GenomicFeatures_1.38.2
[4] vctrs_0.2.4 zlibbioc_1.32.0 memoise_1.1.0
[7] Rsamtools_2.2.3 hms_0.5.3 RCurl_1.98-1.1
[10] XVector_0.26.0 askpass_1.1 htmltools_0.4.0
[13] pillar_1.4.3 BiocVersion_3.10.1 progress_1.2.2
[16] stringr_1.4.0 curl_4.3 later_1.0.0
[19] dplyr_0.8.5 lattice_0.20-38 bit_1.1-15.2
[22] tidyselect_1.0.0 Biostrings_2.54.0 GenomicAlignments_1.22.1
[25] mime_0.9 pkgconfig_2.0.3 fastmap_1.0.1
[28] Matrix_1.2-18 R6_2.4.1 shiny_1.4.0.2
[31] GenomeInfoDbData_1.2.2 SummarizedExperiment_1.16.1 digest_0.6.25
[34] Biobase_2.46.0 AnnotationDbi_1.48.0 matrixStats_0.56.0
[37] stringi_1.4.6 yaml_2.2.1 RSQLite_2.2.0
[40] tibble_2.1.3 httr_1.4.1 compiler_3.6.3
[43] BiocManager_1.30.10 bit64_0.9-7 xtable_1.8-4
[46] BiocParallel_1.20.1 DBI_1.1.0 Rcpp_1.0.4.4
[49] biomaRt_2.42.1 XML_3.99-0.3 openssl_1.4.1
[52] rappdirs_0.3.1 assertthat_0.2.1 blob_1.2.1
[55] DelayedArray_0.12.2 prettyunits_1.1.1 tools_3.6.3
[58] bitops_1.0-6 interactiveDisplayBase_1.24.0 httpuv_1.5.2
[61] packrat_0.5.0 crayon_1.3.4 glue_1.3.2
[64] purrr_0.3.3 rlang_0.4.5 promises_1.1.0
[67] grid_3.6.3*
edit: error message
Hello James,
I just figured out what was the issue, and your sessions allowed me to double-check it. So, thank you!
I thought that the problem would be the platform; and went to check the Global options, and indeed the default was the
Yet, I have no idea why R studio make the 32-bit by default, and why the code doesn't ran on that platform.
Anyway, now its working!
Thank you again o/
Keep safe So I changed to 64-bits, like you and it worked:
Ah, I didn't even look at the platform bitsize. I don't use Rstudio, so had no idea it was doing something inadvisable like that.
yeah, I am somewhat surprised that this happened. Now I hope to have less issues. And also running as admin helped me with other issues - when I tried to install packages they failed because the " path was not writable"
The correct solution is to install and use R as a regular user. This is painful initially (because you have to re-install existing packages) but better in the long run -- it is a grave security risk to run programs as admin.