我正在尝试构建一个利用 rtracklayer 在Genome Browser中创建自定义轨道的Shiny应用程序。代码本身非常简单-我创建了一个范围,一个轨道,一个会话,然后调用browserGenome。
#Coords is simply a table of coordinates
targetRanges <- IRanges(coords$start, coords$end)
targetTrack <- with(coords,GRangesForUCSCGenome("hg38", chromosome_name, targetRanges, strand,name, gene))
session <- browserSession("UCSC")
track(session, "custom_1") <- targetTrack
geneRange <- subset(coords,gene==geneName)
grange <- as(paste(geneRange$chromosome_name[1],':',geneRange$start_position[1],'-',geneRange$end_position[1],sep=''),"GRanges")
browseGenome(targetTrack, range = grange,name="custom_1",viewParams=list(full=c("custom_1")))
这封装在我的Shiny应用程序的服务器部分中。当我在RStudio的Mac上本地运行该应用程序时,它运行得很好。但是,当我在Shiny Server的Ubuntu 16.04.4 LTS上运行它时,它失败并显示以下错误。
Listening on http://127.0.0.1:33958
/usr/bin/xdg-open: 778: /usr/bin/xdg-open: www-browser: not found
/usr/bin/xdg-open: 778: /usr/bin/xdg-open: links2: not found
/usr/bin/xdg-open: 778: /usr/bin/xdg-open: elinks: not found
/usr/bin/xdg-open: 778: /usr/bin/xdg-open: links: not found
/usr/bin/xdg-open: 778: /usr/bin/xdg-open: lynx: not found
/usr/bin/xdg-open: 778: /usr/bin/xdg-open: w3m: not found
xdg-open: no method available for opening 'http://genome.ucsc.edu/cgi-bin/hgTracks?db=hg38&position=chr1%3a43978943-43991170&ct_cust$
现在,我了解它正在尝试打开新的浏览器窗口,但未能在服务器端打开。我不明白的是如何直接将其打开客户端浏览器窗口。
或者,我正在研究是否可以某种方式访问 browseGenome 生成的URL(使用正确的 hgsid ),我可以设置 view = FALSE 并创建我自己的链接供客户端点击。但是经过大量检查和搜索后,我无法在任何数据对象中找到URL。
任何完成这些事情的指针将不胜感激。
谢谢!
Vivek
> sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.4 LTS
attached base packages:
[1] stats4 parallel stats graphics grDevices utils datasets methods base
other attached packages:
[1] seqinr_3.4-5 rtracklayer_1.38.3 GenomicRanges_1.30.3 GenomeInfoDb_1.14.0 IRanges_2.12.0 S4Vectors_0.16.0
[7] BiocGenerics_0.24.0 biomaRt_2.37.8 openxlsx_4.1.0 shinyjs_1.0 shiny_1.1.0 tidyr_0.8.1
[13] gplots_3.0.1 dplyr_0.7.6 epivizrChart_1.3.3
loaded via a namespace (and not attached):
[1] backports_1.1.2 Hmisc_4.1-1 AnnotationHub_2.10.1 plyr_1.8.4
[5] lazyeval_0.2.1 splines_3.5.1 BiocParallel_1.12.0 ggplot2_3.0.0
[9] digest_0.6.17 BiocInstaller_1.28.0 ensembldb_2.2.2 htmltools_0.3.6
[13] gdata_2.18.0 magrittr_1.5 checkmate_1.8.5 memoise_1.1.0
[17] cluster_2.0.7-1 Biostrings_2.46.0 matrixStats_0.54.0 prettyunits_1.0.2
[21] epivizrServer_1.6.0 colorspace_1.3-2 blob_1.1.1 crayon_1.3.4
[25] RCurl_1.95-4.11 jsonlite_1.5 graph_1.56.0 bindr_0.1.1
[29] survival_2.42-6 glue_1.3.0 gtable_0.2.0 zlibbioc_1.24.0
[33] XVector_0.18.0 DelayedArray_0.4.1 scales_1.0.0 DBI_1.0.0
[37] Rcpp_0.12.19 viridisLite_0.3.0 xtable_1.8-3 progress_1.2.0
[41] htmlTable_1.12 foreign_0.8-71 bit_1.1-14 OrganismDbi_1.20.0
[45] Formula_1.2-3 sqldf_0.4-11 htmlwidgets_1.3 httr_1.3.1
[49] RColorBrewer_1.1-2 acepack_1.4.1 pkgconfig_2.0.2 XML_3.98-1.16
[53] nnet_7.3-12 tidyselect_0.2.4 rlang_0.2.2 later_0.7.5
[57] AnnotationDbi_1.40.0 munsell_0.5.0 tools_3.5.1 gsubfn_0.7
[61] RSQLite_2.1.1 ade4_1.7-13 stringr_1.3.1 yaml_2.2.0
[65] knitr_1.20 bit64_0.9-7 zip_1.0.0 caTools_1.17.1.1
[69] purrr_0.2.5 AnnotationFilter_1.2.0 bindrcpp_0.2.2 RBGL_1.54.0
[73] mime_0.5 compiler_3.5.1 rstudioapi_0.7 curl_3.2
[77] png_0.1-7 interactiveDisplayBase_1.16.0 tibble_1.4.2 stringi_1.2.4
[81] GenomicFeatures_1.30.3 lattice_0.20-35 ProtGenerics_1.10.0 Matrix_1.2-14
[85] pillar_1.3.0 data.table_1.11.8 bitops_1.0-6 httpuv_1.4.5.9000
[89] R6_2.2.2 latticeExtra_0.6-28 epivizrData_1.6.0 RMySQL_0.10.15
[93] promises_1.0.1 KernSmooth_2.23-15 gridExtra_2.3 MASS_7.3-50
[97] gtools_3.8.1 assertthat_0.2.0 chron_2.3-53 SummarizedExperiment_1.8.1
[101] proto_1.0.0 rjson_0.2.20 withr_2.1.2 GenomicAlignments_1.14.2
[105] Rsamtools_1.30.0 GenomeInfoDbData_1.0.0 hms_0.4.2 grid_3.5.1
[109] rpart_4.1-13 Biobase_2.38.0 base64enc_0.1-3