Import Chain - Cannot Import Chain File
1
0
Entering edit mode
kipperf • 0
@kipperf-16916
Last seen 5.7 years ago

Hi,

I am trying to use rtracklayer's import.chain function to load a chain file from UCSC. However, I get a weird error. Below is a reproducible example and the error I get. What is happening here?

library(rtracklayer)

download.file("http://hgdownload.cse.ucsc.edu/goldenpath/hg19/vsSelf/hg19.hg19.all.chain.gz",
              "hg19.hg19.all.chain.gz")

system("gzip -d hg19.hg19.all.chain.gz")

chain <- import.chain("hg19.hg19.all.chain")

The error is:

Error in .local(con, format, text, ...) : expected 11 elements in header, got 3, on line 1

What is import looking for here? My sessionInfo() is below.


R version 3.3.0 (2016-05-03) Platform: x86_64-redhat-linux-gnu (64-bit) Running under: CentOS Linux 7 (Core)

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=en_US.UTF-8 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] stats4 parallel stats graphics grDevices utils datasets [8] methods base other attached packages: [1] rtracklayer_1.32.2 AnnotationHub_2.4.2 [3] InteractionSet_1.0.4 SummarizedExperiment_1.2.3 [5] Biobase_2.32.0 GenomicRanges_1.24.3 [7] GenomeInfoDb_1.8.7 IRanges_2.6.1 [9] S4Vectors_0.10.3 BiocGenerics_0.18.0 [11] Chicago_1.0.4 data.table_1.10.4-3 [13] magrittr_1.5 scales_0.5.0.9000

loaded via a namespace (and not attached): [1] Rcpp_0.12.14 lattice_0.20-33 [3] Delaporte_6.2.0 Rsamtools_1.24.0 [5] Biostrings_2.40.2 digest_0.6.12 [7] mime_0.5 R6_2.2.2 [9] plyr_1.8.4 backports_1.1.2 [11] acepack_1.4.1 RSQLite_1.0.0 [13] httr_1.3.1 ggplot2_2.2.1.9000 [15] BiocInstaller_1.22.3 zlibbioc_1.18.0 [17] rlang_0.1.4 lazyeval_0.2.1 [19] curl_3.0 rstudioapi_0.6 [21] rpart_4.1-10 Matrix_1.2-6 [23] checkmate_1.8.5 splines_3.3.0 [25] BiocParallel_1.6.6 stringr_1.2.0 [27] foreign_0.8-66 htmlwidgets_0.9 [29] RCurl_1.95-4.8 munsell_0.4.3 [31] shiny_1.0.3 compiler_3.3.0 [33] httpuv_1.3.5 base64enc_0.1-3 [35] htmltools_0.3.6 nnet_7.3-12 [37] tibble_1.3.4 gridExtra_2.3 [39] htmlTable_1.12 interactiveDisplayBase_1.10.3 [41] Hmisc_4.1-1 matrixStats_0.54.0 [43] XML_3.98-1.4 GenomicAlignments_1.8.4 [45] bitops_1.0-6 MASS_7.3-45 [47] grid_3.3.0 xtable_1.8-2 [49] gtable_0.2.0 DBI_0.5 [51] stringi_1.1.6 XVector_0.12.1 [53] latticeExtra_0.6-28 Formula_1.2-3 [55] RColorBrewer_1.1-2 tools_3.3.0 [57] survival_2.42-6 AnnotationDbi_1.34.4 [59] colorspace_1.2-6 cluster_2.0.4 [61] knitr_1.14
rtracklayer • 2.4k views
ADD COMMENT
1
Entering edit mode
@michael-lawrence-3846
Last seen 2.4 years ago
United States

Looks like the UCSC chain file format has changed, or at least they are using features that they weren't before. It may take a bit for me to fix the parser.

ADD COMMENT
0
Entering edit mode

Ok version 1.40.5 (release) should have the fix. We needed to ignore comments (apparently an undocumented feature of the format).

ADD REPLY
0
Entering edit mode

Thanks for the quick turnaround!

ADD REPLY
0
Entering edit mode

It seems that the problem is back with import.chain(), despite rtracklayer_1.50.0. Is that (https://genome.ucsc.edu/goldenPath/help/chain.html) still the expected format?

ADD REPLY

Login before adding your answer.

Traffic: 579 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6