Open dalloliogm opened 5 years ago
Hi, yes, I am. In the example above, I am loading epivizr and epivizrServer. Thanks for the answer.
if you use the epivizr
package, you do not need to explicitly create the server. Once you start an epivizr session, it automatically creates an instance of the epivizrServer.
library(epivizr)
library(antiProfilesData)
library(SummarizedExperiment)
app <- startEpiviz(workspace="qyOTB6vVnff", gists="2caf8e891201130c7daa")
blocks_chart <- app$plot(tcga_colon_blocks, datasource_name="450k colon_blocks")
app$stop_app()
for more examples, please see the vignettes from the epivizr
package. Let me know if you still have issues.
Thanks... unfortunately I still get the "Not Connected" error, when copying&pasting the code from your post:
Epiviz App connection:
Server: <EpivizServer> port: 7123, not connected
Measurements:
id name length connected columns
1 450k colon_blocks_1 450k colon_blocks 129
We've seen this happen with a few users before where they use enterprise laptops and the user has limited access to opening ports. Another way to test this might be to see if you can run a shiny app locally ? Also after running the startEpiviz
function, does the app open the browser ? Opening the browser is necessary to establish the initial connection between the browser and the R-session.
I am working with gio on trying to get this working on our system. When I execute the example a browser window opens but at the following location http://epiviz.cbcb.umd.edu/4/index.php?websocket-host[]=ws://localhost:7123&debug=false&ws=qyOTB6vVnff&gist[]=2caf8e891201130c7daa&useCookie=true&settings=default&
is that the correct behaviour?
yes, opening the browser connects it with the R-session. Now you can visualize datasets from the R-session with the browser. If you would like to run everything locally, we have another package called epivizrStandalone. The API is very similar to epivizr
but everything is run locally instead of our hosted web browser.
Excellent I'll give that a try this afternoon. thank you very much
Thank you, I've tried epivizrStandAlone and I was able to visualize something. It opened a browser on the local machine, which I can access from other machines.
library(epivizrStandalone)
library(Homo.sapiens)
app <- startStandalone(Homo.sapiens,
keep_seqlevels=paste0("chr",c(1:22,"X","Y")),
verbose=TRUE,
use_viewer_option = TRUE,
non_interactive=F, host="10.137.232.212", try_ports=T)
However the browser is empty.. no genes and no chromosomes. Is that normal? Is there a guide to describe how to add them? Moreover, the browser dies after a while, with the message:
Error in .wait_until_connected(app$server) :
[epivizrStandalone] Error starting app. UI unable to connect to websocket server.
I saw that there is also an epiviz project, with an application that runs via docker. I can start that without many issues, however I can't send data to it from R.
Apologies if this is already documented, I am a bit lost among the epiviz packages :-). Thanks for the great work, anyway.
Hello, We modularized our packages so that it is easier to use them across different projects. The packages that the end user would use would be either epivizr
or epivizrStandalone
. both these packages use the R-session to act as a backend webserver responding to requests from the UI and serve data loaded into the R-session. the packages differ where the UI is run from - epivizr
package uses the UI hosted here at UMD (http://epiviz.cbcb.umd.edu) whereas the epivizrStandalone
package downloads the UI locally from Github and serves the application.
I made a short screencast of the epivizrStandalone
running inside Rstudio's viewer using some example datasets (I use chr11 because the sample datasets only contain data in this region).
https://www.loom.com/share/00aca7b2bc3a41278b0b2af74bed85dd
the code from the screencast
library(epivizrStandalone)
library(Homo.sapiens)
app <- startStandalone(Homo.sapiens,
keep_seqlevels=paste0("chr",c(1:19,"X","Y")),
chr="chr11",
start=110081455,
end=135006517,
verbose=TRUE,
use_viewer_option = TRUE)
## load sample datasets
data("tcga_colon_blocks")
data("tcga_colon_curves")
data("tcga_colon_expression")
app$plot(tcga_colon_blocks, datasource_name = "tcga 450K blocks")
app$plot(tcga_colon_curves, datasource_name = "tcga 450K methylation", type="bp",
columns=c("cancerMean", "normalMean"))
## stops the app and removes the datasets from the UI
app$stop_app()
looking at your code, I think using the host= "10.137.232.212"
might be causing the issue. Can you try this without this parameter ? Sorry for the confusion on the packages and This helps us get better at documenting. Let me know if you continue to have issues.
I've run the above and it opens a blank EpiViz4 page and I get the following errors
app <- startStandalone(Homo.sapiens,
data("tcga_colon_blocks") data("tcga_colon_curves") data("tcga_colon_expression") app$plot(tcga_colon_blocks,datasource_name = "tcga 450K blocks") Error in app$plot(tcga_colon_blocks, datasource_name = "tcga 450K blocks") : Error adding measurements for data object app$plot(tcga_colon_curves,datasource_name = "tcga 450K methylation",type="bp",
Any ideas?
hello @harrica, can you run
setStandalone()
before you execute the code snippet from the previous post ? Can you post the error if you see one ? Also can you post the sessionInfo()
of the machine you are running this on ?
here it is
setStandalone() cloning epiviz from git... cloning into '/home/rh682900/R/x86_64-redhat-linux-gnu-library/3.3/epivizrStandalone/www'... Receiving objects: 1% (126/12514), 60 kb Receiving objects: 11% (1377/12514), 742 kb Receiving objects: 21% (2628/12514), 3253 kb Receiving objects: 31% (3880/12514), 16227 kb Receiving objects: 41% (5131/12514), 21858 kb Receiving objects: 51% (6383/12514), 29217 kb Receiving objects: 61% (7634/12514), 30513 kb Receiving objects: 71% (8885/12514), 44527 kb Receiving objects: 81% (10137/12514), 44879 kb Receiving objects: 91% (11388/12514), 45295 kb Receiving objects: 100% (12514/12514), 46099 kb, done. [1] "/home/rh682900/R/x86_64-redhat-linux-gnu-library/3.3/epivizrStandalone/www"
sessionInfo() R version 3.3.3 (2017-03-06) Platform: x86_64-redhat-linux-gnu (64-bit) Running under: Red Hat Enterprise Linux
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8
[4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats4 parallel stats graphics grDevices utils datasets methods
[9] base
other attached packages:
[1] antiProfilesData_1.10.0 Homo.sapiens_1.3.1
[3] TxDb.Hsapiens.UCSC.hg19.knownGene_3.2.2 org.Hs.eg.db_3.4.0
[5] GO.db_3.4.0 OrganismDbi_1.16.0
[7] GenomicFeatures_1.26.4 GenomicRanges_1.26.4
[9] GenomeInfoDb_1.10.3 AnnotationDbi_1.36.2
[11] IRanges_2.8.2 S4Vectors_0.12.2
[13] epivizrData_1.2.0 Biobase_2.34.0
[15] BiocGenerics_0.20.0 epivizrServer_1.2.0
[17] epivizrStandalone_1.2.0 epivizr_2.4.1
loaded via a namespace (and not attached):
[1] Rcpp_1.0.1 git2r_0.25.2 BiocInstaller_1.24.0
[4] pillar_1.3.1 XVector_0.14.1 bitops_1.0-6
[7] tools_3.3.3 zlibbioc_1.20.0 biomaRt_2.30.0
[10] digest_0.6.12 bit_1.1-12 lattice_0.20-35
[13] RSQLite_2.0 memoise_1.1.0 tibble_2.1.1
[16] pkgconfig_2.0.2 rlang_0.3.4 graph_1.52.0
[19] Matrix_1.2-10 DBI_0.7 rstudioapi_0.6
[22] yaml_2.1.14 rtracklayer_1.34.2 Biostrings_2.42.1
[25] grid_3.3.3 bit64_0.9-7 R6_2.2.2
[28] RBGL_1.50.0 XML_3.98-1.9 BiocParallel_1.8.2
[31] blob_1.1.0 Rsamtools_1.26.2 GenomicAlignments_1.10.1
[34] SummarizedExperiment_1.4.0 mime_0.5 httpuv_1.3.3
[37] RCurl_1.95-4.8 crayon_1.3.4 rjson_0.2.20
does running the script after setStandalone()
work now ? If not are you running this on rstudio locally or on a remote machine ?
I get the same error, its running on a remote rstudio. I will attempt it locally on my Mac tomorrow
good morning, I've upgraded rstudio and r on my mac and installed the new packages. on RStudio standalone the code successfully runs and shows itself in the viewer window in RStudio but now I'm not sure how to get it to a browser window
Hello @harrica, glad to hear it worked! if you remove this parameter use_viewer_option = TRUE
when you start the app, this would open in a normal browser window.
Ah, cool let me give that a try? Now to debug the stuff running on the corp platform, I’ll have to get back to that tomorrow,
Richard Harvey Sent from my iPhone
On Apr 23, 2019, at 9:53 AM, Jayaram Kancherla notifications@github.com wrote:
Hello @harrica, glad to hear it worked! if you remove this parameter use_viewer_option = TRUE when you start the app, this would open in a normal browser window.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
that worked great on a standalone RStudio on my desktop thanks
Hello again, when looking at developer tools in chrome I get 3 errors. epiviz-min.js:2794 Mixed Content: The page at 'https://us1salxhpe0012.corpnet2.com:8787/s/b08f2cfc78a31cc71c66f/p/7123/epivizr-standalone.html?websocket-host[]=ws://127.0.0.1:7123&debug=false&useCookie=false&' was loaded over HTTPS, but attempted to connect to the insecure WebSocket endpoint 'ws://us1salxhpe0012.corpnet2.com:8787/s/b08f2cfc78a31cc71c66f/p/7123/websocket'. This request has been blocked; this endpoint must be available over WSS. epiviz.data.WebsocketDataProvider._initialize @ epiviz-min.js:2794 :8787/s/b08f2cfc78a31cc71c66f/p/7123/css/epiviz_2_icon.png:1 Failed to load resource: the server responded with a status of 404 (Not Found) epiviz-min.css:1 Failed to load resource: the server responded with a status of 500 (Internal Server Error)
It looks like it wants to connect to secure websocket and is failing that. Is there a way to ask it to go to a secure web socket?
from the url, I notice that the server is running on
https://us1salxhpe0012.corpnet2.com:8787
but the websocket is trying to connect to localhost on the client
websocket-host[]=ws://127.0.0.1:7123
Instead of 127.0.0.1
, can you replace this with where the server is running, may be us1salxhpe0012.corpnet2.com
is this on a rstudio server ?
yes it's on rstudio server. the https://us1salxhpe0012.corpnet2.com:8787 is rstudio server pro. do I just use the host parameter
Can you try this url ? (using the same host for ui and websocket)
https://us1salxhpe0012.corpnet2.com:8787/s/b08f2cfc78a31cc71c66f/p/7123/epivizr-standalone.html?websocket-host[]=ws://us1salxhpe0012.corpnet2.com:7123&debug=false&useCookie=false&
Hello, I've tried the URL (I'm in the same network as @harrica ) but it says "Connection Refused"
Hello @dalloliogm & @harrica
can we use gitter to chat about this issue ?
https://gitter.im/epiviz/general?utm_source=share-link&utm_medium=link&utm_campaign=share-link
ok I have tried the following with no success.
library(epivizrStandalone) library(epivizrData) library(Homo.sapiens) setStandalone() app <- startStandalone(Homo.sapiens, keep_seqlevels = paste0("chr",c(1:19,"X","Y")), chr="chr11", start=110081455, end=135006517, verbose=TRUE, use_viewer_option=FALSE, host="https://us1salxhpe0012.corpnet2.com:8787/s/b08f2cfc78a31cc71c66f/p/7123/epivizr-standalone.html?websocket-host[]=ws://us1salxhpe0012.corpnet2.com:7123&debug=false&useCookie=false&") data("tcga_colon_blocks") data("tcga_colon_curves") data("tcga_colon_expression") app$plot(tcga_colon_blocks,datasource_name = "tcga 450K blocks") app$plot(tcga_colon_curves,datasource_name = "tcga 450K methylation",type="bp", columns=c("cancerMean","normalMean")) Using url http://https://us1salxhpe0012.corpnet2.com:8787/s/b08f2cfc78a31cc71c66f/p/7123/epivizr-standalone.html?websocket-host[]=ws://us1salxhpe0012.corpnet2.com:7123&debug=false&useCookie=false&:7123/epivizr-standalone.html?websocket-host[]=ws://https://us1salxhpe0012.corpnet2.com:8787/s/b08f2cfc78a31cc71c66f/p/7123/epivizr-standalone.html?websocket-host[]=ws://us1salxhpe0012.corpnet2.com:7123&debug=false&useCookie=false&:7123&debug=false&useCookie=false& Error in .wait_until_connected(app$server) : [epivizrStandalone] Error starting app. UI unable to connect to websocket server
is there a way to do a wss to the local host?
Hi @harrica
the host parameter is where the server is running, in your case it'll be us1salxhpe0012.corpnet2.com
I’ll try the remote url in the morning and I’d be more than happy to join a gitter chat I’ll figure that out in the morning as well
Richard Harvey Sent from my iPhone
On Apr 25, 2019, at 8:10 AM, Jayaram Kancherla notifications@github.com wrote:
Hi @harrica
the host parameter is where the server is running, in your case it'll be us1salxhpe0012.corpnet2.com
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
i put in the host parameter suggested and get a UI unable to connect to WebSocket server, and while it throws a page to the localhost we have seen the behavior previously. I think we may need to talk on gitter chat
Hello @harrica, I am on gitter.
as am I not sure how to find you though
I added you to the gitter chat room, if you don't see the invite, you can sign in here -
https://gitter.im/epiviz/general?utm_source=share-link&utm_medium=link&utm_campaign=share-link
Gio, it's going to take a bit of work to attempt this, but I'm also unsure if it will work. The base problem is that we apparently have a different version of R from the CLI than from RStudio that isn't something I can change. I will attempt to install all the bioconductor stuff locally and give this a try. I think we will run into the same problem in not supporting secure websockets because the underlying code being used by epiviz is based upon httpuv, the owner of that package has said it does not support wss and that hey have no plans to do it.
Hi @harrica, if you prefer I can try it as I already have an R installation with some bioconductor packages installed, so that will save time.
I finally have a http version of rstudio server pro running and am trying to get the standalone code running again. to refresh memories. library(epivizrStandalone) library(epivizrData) library(Homo.sapiens)
app <- startStandalone(Homo.sapiens, keep_seqlevels = paste0("chr",c(1:19,"X","Y")), chr="chr11", start=110081455, end=135006517, verbose=TRUE, use_viewer_option=FALSE, host="us1salxhpg0012.corpnet2.com") data("tcga_colon_blocks") data("tcga_colon_curves") data("tcga_colon_expression") app$plot(tcga_colon_blocks,datasource_name = "tcga 450K blocks") app$plot(tcga_colon_curves,datasource_name = "tcga 450K methylation",type="bp", columns=c("cancerMean","normalMean")) when I run this in rstudio I get checking for updates to epiviz app... Starting Epivizr! Initializing session manager... Opening connections... Done starting Epivizr! Starting epiviz websocket connection Opening browser Using url http://us1salxhpg0012.corpnet2.com:7123/epivizr-standalone.html?websocket-host[]=ws://us1salxhpg0012.corpnet2.com:7123&debug=false&useCookie=false& Error in .wait_until_connected(app$server) : [epivizrStandalone] Error starting app. UI unable to connect to websocket server.
any ideas?
after messing around a bit I now get the following I pasted since it is a little long epiviz.txt
do you see a browser tab open with epiviz ? From what you pasted, the server and the UI seems to be communicating, can you run this first,
library(epivizrStandalone)
library(epivizrData)
library(Homo.sapiens)
#setStandalone()
app <- startStandalone(Homo.sapiens,
keep_seqlevels = paste0("chr",c(1:19,"X","Y")),
chr="chr11",
start=110081455,
end=135006517,
verbose=TRUE,
use_viewer_option=FALSE,
host="us1salxhpg0012.corpnet2.com")
wait from the browser tab to open and then run the remaining script
the web socket seems to be working since I can close it with app$stop_app
ok I have a web page - ran the startStandalone and then when the page appears I get
data("tcga_colon_curves")
data("tcga_colon_expression") app$plot(tcga_colon_blocks,datasource_name = "tcga 450K blocks") Error in .self$visualize(chart_type, datasource = measurement_object, : Can't visualize BlocksTrack, it is not registered app$plot(tcga_colon_curves,datasource_name = "tcga 450K methylation",type="bp",
- columns=c("cancerMean","normalMean")) Error in .self$visualize(chart_type, datasource = measurement_object, : Can't visualize LineTrack, it is not registered
can you send me the screenshot of what the page looks like ?
here it is
Since your server can now establish websocket connections, can you try this code, this uses the UI we host at UMD
library(epivizr)
library(antiProfilesData)
library(SummarizedExperiment)
data("tcga_colon_blocks")
app <- startEpiviz(workspace="qyOTB6vVnff", gists="2caf8e891201130c7daa")
blocks_chart <- app$plot(tcga_colon_blocks, datasource_name="450k colon_blocks")
app$stop_app()
don't run the last line as that closes the session and removes the chart.
when I run the above it spawns a browser draws a picture and produces the following error
blocks_chart <- app$plot(tcga_colon_blocks, datasource_name="450k colon_blocks") Error in app$plot(tcga_colon_blocks, datasource_name = "450k colon_blocks") : Error adding measurements for data object
if it's of any use to you I get the same results from the RStudio-server instance I'm running from home for bot Standalone and this snippet
also is there a way to increase the wait time for the web socket server, I can't tell if we are timing out.
Hello, I've followed the instructions in the tutorial. However, when I open the server page, I can only see a "Test page" message.
What am I doing wrong?
Moreover, when I print the episerver or epiclient variables, I get a "not connected" message: