ivanek / Gviz

This is the Gviz development repository. Gviz plots data and annotation information along genomic coordinates.
https://bioconductor.org/packages/Gviz/
Artistic License 2.0
75 stars 10 forks source link

IdeogramTrack() can't import chromosome length #72

Closed timpeters82 closed 1 year ago

timpeters82 commented 1 year ago

Hi Robert et al.,

Just reporting this issue since DMRcate uses Gviz for plotting. This could be a temporary problem on my end and I'm happy to be told so. When I try to import a chromosome using IdeogramTrack(), it throws an error saying it can't access chromosome lengths:

> ideoTrack <- IdeogramTrack(genome = "hg38",chromosome = "chr22")
Error in value[[3L]](cond) : 
  There doesn't seem to be any chromosome length data available for genome 'hg38' at UCSC or the service is temporarily down.
In addition: Warning messages:
1: In curlSetOpt(..., .opts = .opts, curl = h, .encoding = .encoding) :
  Error setting the option for # 3 (status = 43) (enum = 81) (value = 0x56228ca457b0): A libcurl function was given a bad argument CURLOPT_SSL_VERIFYHOST no longer supports 1 as value!
2: In value[[3L]](cond) :
  There doesn't seem to be any cytoband data available for genome 'hg38' at UCSC or the service is temporarily down. Trying to fetch the chromosome length data.

I have tried this on multiple machines with different internet connections, all working fine, so I don't think it's a connectivity problem. Here is the traceback and sessionInfo:

> traceback()
19: stop("There doesn't seem to be any chromosome length data available for genome '", 
        genome, "' at UCSC or the service is temporarily down.")
18: value[[3L]](cond)
17: tryCatchOne(expr, names, parentenv, handlers[[1L]])
16: tryCatchList(expr, classes, parentenv, handlers)
15: tryCatch(ucscTableQuery(session, table = "chromInfo"), error = function(e) {
        stop("There doesn't seem to be any chromosome length data available for genome '", 
            genome, "' at UCSC or the service is temporarily down.")
    })
14: value[[3L]](cond)
13: tryCatchOne(expr, names, parentenv, handlers[[1L]])
12: tryCatchList(expr, classes, parentenv, handlers)
11: tryCatch(ucscTableQuery(session, table = "cytoBandIdeo"), error = function(e) {
        warning("There doesn't seem to be any cytoband data available for genome '", 
            genome, "' at UCSC or the service is temporarily down. Trying to fetch the chromosome length data.")
        tryCatch(ucscTableQuery(session, table = "chromInfo"), error = function(e) {
            stop("There doesn't seem to be any chromosome length data available for genome '", 
                genome, "' at UCSC or the service is temporarily down.")
        })
    })
10: eval(expression, envir = callEnv)
9: eval(expression, envir = callEnv)
8: eval(expression, envir = callEnv)
7: .doCache(genomesToken, expression({
       if (!genome %in% as.character(genomes[, "db"])) {
           stop("'", genome, "' is not a valid UCSC genome.")
       }
       sessionToken <- paste("session", genome, sep = "_")
       session <- .doCache(sessionToken, expression({
           myUcscUrl <- getOption("Gviz.ucscUrl")
           tmp <- if (is.null(myUcscUrl)) browserSession() else browserSession(url = myUcscUrl)
           genome(tmp) <- genome
           tmp
       }), env, cenv)
       query <- tryCatch(ucscTableQuery(session, table = "cytoBandIdeo"), 
           error = function(e) {
               warning("There doesn't seem to be any cytoband data available for genome '", 
                   genome, "' at UCSC or the service is temporarily down. Trying to fetch the chromosome length data.")
               tryCatch(ucscTableQuery(session, table = "chromInfo"), 
                   error = function(e) {
                     stop("There doesn't seem to be any chromosome length data available for genome '", 
                       genome, "' at UCSC or the service is temporarily down.")
                   })
           })
       out <- getTable(query)
       if (all(c("chrom", "size") %in% colnames(out))) {
           out <- data.frame(chrom = out$chrom, chromStart = 0, 
               chromEnd = out$size, name = "", gieStain = "gneg", 
               stringsAsFactors = FALSE)
       }
       out
   }), env, cenv)
6: .cacheGenomes(genome = genome)
5: .local(.Object, ...)
4: initialize(value, ...)
3: initialize(value, ...)
2: new("IdeogramTrack", chromosome = chromosome, genome = genome, 
       name = name, bands = bands, ...)
1: IdeogramTrack(genome = "hg38", chromosome = "chr22")
> sessionInfo()
R version 4.2.2 Patched (2022-11-10 r83330)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.6 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1

locale:
 [1] LC_CTYPE=en_AU.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_AU.UTF-8        LC_COLLATE=en_AU.UTF-8    
 [5] LC_MONETARY=en_AU.UTF-8    LC_MESSAGES=en_AU.UTF-8   
 [7] LC_PAPER=en_AU.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_AU.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] grid      stats4    stats     graphics  grDevices utils     datasets 
[8] methods   base     

other attached packages:
[1] Gviz_1.41.1          GenomicRanges_1.50.2 GenomeInfoDb_1.34.7 
[4] IRanges_2.32.0       S4Vectors_0.36.1     BiocGenerics_0.44.0 

loaded via a namespace (and not attached):
  [1] ProtGenerics_1.30.0         bitops_1.0-7               
  [3] matrixStats_0.63.0          bit64_4.0.5                
  [5] filelock_1.0.2              RColorBrewer_1.1-3         
  [7] progress_1.2.2              httr_1.4.4                 
  [9] tools_4.2.2                 backports_1.4.1            
 [11] utf8_1.2.3                  R6_2.5.1                   
 [13] rpart_4.1.19                lazyeval_0.2.2             
 [15] Hmisc_4.7-2                 DBI_1.1.3                  
 [17] colorspace_2.1-0            nnet_7.3-18                
 [19] tidyselect_1.2.0            gridExtra_2.3              
 [21] prettyunits_1.1.1           bit_4.0.5                  
 [23] curl_5.0.0                  compiler_4.2.2             
 [25] cli_3.6.0                   Biobase_2.58.0             
 [27] htmlTable_2.4.1             xml2_1.3.3                 
 [29] DelayedArray_0.24.0         rtracklayer_1.58.0         
 [31] scales_1.2.1                checkmate_2.1.0            
 [33] rappdirs_0.3.3              stringr_1.5.0              
 [35] digest_0.6.31               Rsamtools_2.14.0           
 [37] foreign_0.8-82              XVector_0.38.0             
 [39] dichromat_2.0-0.1           htmltools_0.5.4            
 [41] base64enc_0.1-3             jpeg_0.1-10                
 [43] pkgconfig_2.0.3             MatrixGenerics_1.10.0      
 [45] ensembldb_2.22.0            dbplyr_2.3.0               
 [47] fastmap_1.1.0               BSgenome_1.66.2            
 [49] htmlwidgets_1.6.1           rlang_1.0.6                
 [51] rstudioapi_0.14             RSQLite_2.2.20             
 [53] BiocIO_1.8.0                generics_0.1.3             
 [55] BiocParallel_1.32.5         dplyr_1.1.0                
 [57] VariantAnnotation_1.44.0    RCurl_1.98-1.10            
 [59] magrittr_2.0.3              GenomeInfoDbData_1.2.9     
 [61] Formula_1.2-4               interp_1.1-3               
 [63] Matrix_1.5-1                Rcpp_1.0.10                
 [65] munsell_0.5.0               fansi_1.0.4                
 [67] lifecycle_1.0.3             stringi_1.7.12             
 [69] yaml_2.3.7                  SummarizedExperiment_1.28.0
 [71] zlibbioc_1.44.0             BiocFileCache_2.6.0        
 [73] blob_1.2.3                  parallel_4.2.2             
 [75] crayon_1.5.2                deldir_1.0-6               
 [77] lattice_0.20-45             Biostrings_2.66.0          
 [79] splines_4.2.2               GenomicFeatures_1.50.4     
 [81] hms_1.1.2                   KEGGREST_1.38.0            
 [83] knitr_1.42                  pillar_1.8.1               
 [85] rjson_0.2.21                codetools_0.2-18           
 [87] biomaRt_2.54.0              XML_3.99-0.13              
 [89] glue_1.6.2                  biovizBase_1.46.0          
 [91] latticeExtra_0.6-30         data.table_1.14.6          
 [93] png_0.1-8                   vctrs_0.5.2                
 [95] gtable_0.3.1                assertthat_0.2.1           
 [97] cachem_1.0.6                ggplot2_3.4.0              
 [99] xfun_0.37                   AnnotationFilter_1.22.0    
[101] restfulr_0.0.15             survival_3.4-0             
[103] tibble_3.1.8                GenomicAlignments_1.34.0   
[105] AnnotationDbi_1.60.0        memoise_2.0.1              
[107] cluster_2.1.4               ellipsis_0.3.2        

Any fixes and/or suggestions would be much appreciated. Best, Tim

ivanek commented 1 year ago

hi Tim,

I am afraid it might be related to internet connection to UCSC servers. I hope it works for you in the meantime.