Error retrieving cytobands from UCSC
1
0
Entering edit mode
bernatgel ▴ 150
@bernatgel-7226
Last seen 14 hours ago
Spain

Hi,

I'm using biovizBase::getIdeogram to retrieve the cytobands of different genomes from UCSC.

For some genomes such as hg38 it works and returns the expected results but produces warnings:

Warning messages:
1: In .local(x, ...) :
  'track' parameter is deprecated now you go by the 'table' instead
                Use ucscTables(genome, track) to retrieve the list of tables for a track
2: In curlSetOpt(..., .opts = .opts, curl = h, .encoding = .encoding) :
  Error setting the option for # 3 (status = 43) (enum = 81) (value = 0x558419645b70): A libcurl function was given a bad argument CURLOPT_SSL_VERIFYHOST no longer supports 1 as value!

but for other genomes it errors and produces no output

> biovizBase::getIdeogram("hg19", cytobands=TRUE, )
[1] "hg19"
Loading ideogram...
Loading ranges...
Error in .normarg_seqlengths(value, seqnames(x)) : 
  the names on the supplied 'seqlengths' vector must be identical to the seqnames
In addition: Warning messages:
1: In .local(x, ...) :
  'track' parameter is deprecated now you go by the 'table' instead
                Use ucscTables(genome, track) to retrieve the list of tables for a track
2: In curlSetOpt(..., .opts = .opts, curl = h, .encoding = .encoding) :
  Error setting the option for # 3 (status = 43) (enum = 81) (value = 0x5584175a7560): A libcurl function was given a bad argument CURLOPT_SSL_VERIFYHOST no longer supports 1 as value!

Could it be a bug in the code or some changes in UCSC that prevent the code from working or it's me doing something wrong?

Thanks a lot

Bernat

sessionInfo()
R version 4.3.0 (2023-04-21)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux 10 (buster)

Matrix products: default
BLAS:   /software/debian-10/general/R-4.3.0-bioc-3.17/lib/R/lib/libRblas.so 
LAPACK: /software/debian-10/general/R-4.3.0-bioc-3.17/lib/R/lib/libRlapack.so;  LAPACK version 3.11.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=C                  LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8   
 [6] LC_MESSAGES=en_US.UTF-8    LC_PAPER=es_ES.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

time zone: Europe/Madrid
tzcode source: system (glibc)

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

other attached packages:
[1] rtracklayer_1.60.0   GenomicRanges_1.52.0 GenomeInfoDb_1.36.0  IRanges_2.34.0       S4Vectors_0.38.1     BiocGenerics_0.46.0 
[7] biovizBase_1.48.0   

loaded via a namespace (and not attached):
  [1] DBI_1.1.3                   bitops_1.0-7                gridExtra_2.3               biomaRt_2.56.1              rlang_1.1.1                
  [6] magrittr_2.0.3              matrixStats_1.0.0           compiler_4.3.0              RSQLite_2.3.1               GenomicFeatures_1.52.0     
 [11] png_0.1-8                   vctrs_0.6.3                 ProtGenerics_1.32.0         stringr_1.5.0               pkgconfig_2.0.3            
 [16] crayon_1.5.2                fastmap_1.1.1               backports_1.4.1             dbplyr_2.3.2                XVector_0.40.0             
 [21] utf8_1.2.3                  Rsamtools_2.16.0            rmarkdown_2.22              bit_4.0.5                   xfun_0.39                  
 [26] zlibbioc_1.46.0             cachem_1.0.8                progress_1.2.2              blob_1.2.4                  DelayedArray_0.26.3        
 [31] BiocParallel_1.34.2         parallel_4.3.0              prettyunits_1.1.1           cluster_2.1.4               VariantAnnotation_1.46.0   
 [36] R6_2.5.1                    stringi_1.7.12              RColorBrewer_1.1-3          rpart_4.1.19                SummarizedExperiment_1.30.2
 [41] knitr_1.43                  base64enc_0.1-3             Matrix_1.5-4.1              nnet_7.3-19                 tidyselect_1.2.0           
 [46] yaml_2.3.7                  rstudioapi_0.14             dichromat_2.0-0.1           codetools_0.2-19            curl_5.0.1                 
 [51] lattice_0.21-8              tibble_3.2.1                Biobase_2.60.0              KEGGREST_1.40.0             evaluate_0.21              
 [56] foreign_0.8-84              BiocFileCache_2.8.0         xml2_1.3.4                  Biostrings_2.68.1           pillar_1.9.0               
 [61] filelock_1.0.2              MatrixGenerics_1.12.2       checkmate_2.2.0             generics_0.1.3              RCurl_1.98-1.12            
 [66] ensembldb_2.24.0            hms_1.1.3                   ggplot2_3.4.2               munsell_0.5.0               scales_1.2.1               
 [71] glue_1.6.2                  Hmisc_5.1-0                 lazyeval_0.2.2              tools_4.3.0                 BiocIO_1.10.0              
 [76] data.table_1.14.8           BSgenome_1.68.0             GenomicAlignments_1.36.0    XML_3.99-0.14               grid_4.3.0                 
 [81] AnnotationDbi_1.62.1        colorspace_2.1-0            GenomeInfoDbData_1.2.10     restfulr_0.0.15             htmlTable_2.4.1            
 [86] Formula_1.2-5               cli_3.6.1                   rappdirs_0.3.3              fansi_1.0.4                 S4Arrays_1.0.4             
 [91] dplyr_1.1.2                 AnnotationFilter_1.24.0     gtable_0.3.3                digest_0.6.31               rjson_0.2.21               
 [96] htmlwidgets_1.6.2           memoise_2.0.1               htmltools_0.5.5             lifecycle_1.0.3             httr_1.4.6                 
[101] bit64_4.0.5
biovizBase biovi • 854 views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 4 hours ago
United States

It is unfortunately not uncommon for UCSC to change table structure or contents and end up breaking things on our end. The error comes from some error checking within getIdeogram that you might not need. You are really just querying the cytoBand table.

> library(rtracklayer)
> session <- browserSession()
> genome(session) <- "hg19"
> query <- ucscTableQuery(session, "cytoBand")
Warning message:
In .local(x, ...) :
  'track' parameter is deprecated now you go by the 'table' instead
                Use ucscTables(genome, track) to retrieve the list of tables for a track

> df <- getTable(query)
> gr <- with(df, GRanges(chrom, IRanges(chromStart, chromEnd), name = factor(name), gieStain = factor(gieStain)))
> gr <- keepStandardChromosomes(gr, pruning.mode = "coarse")
> library(ggbio)
> autoplot(gr, layout = "karyotype", cytobands = TRUE)

OR alternatively just note that you already have these data!

> data(ideoCyto)
> autoplot(ideoCyto$hg19, layout = "karyotype", cytobands = TRUE)
ADD COMMENT

Login before adding your answer.

Traffic: 722 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