Name: hello_genomics_viz_py36
Owner: FASTGenomics
Description: Sample Python visualization
Created: 2017-10-11 13:42:05.0
Updated: 2017-10-13 11:14:38.0
Pushed: 2018-01-04 14:23:54.0
Size: 686
Language: Python
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
o O o o .oOOOo.
O o O O .O o o
o O o o o
OoOooOOo O O O
o O .oOo. o o .oOo. O .oOOo .oOo. 'OoOo. .oOo. `oOOoOO. O .oOo .oOo
O o OooO' O O O o o. O OooO' o O O o O o o o O `Ooo.
o o O o o o O O. oO O O o o O o O O O o O
o O `OoO' Oo Oo `OoO' `OooO' `OoO' o O `OoO' O o o o' `OoO' `OoO'
Writing an visualization is easy - there are some conventions you need to know, but otherwise you are free to use the tools you like, e.g. Python, R, Plotly.
This document explains the basic concepts using our “Hello Genomics” visualization app as an example.
In FASTGenomics visualizations are realized by visualization apps. These apps generate a website (HTML, Javascript), which is shown as part of the analysis. Hence you can use the full power of the web and equip your visualization with every element you can imagine.
In our example visualization, we use plotly.js as open source JavaScript graphing library together with Flask for serving the data.
Use this example as a skeleton and follow the instructions of our example calculation Hello Genomics Calculation but ignore any output and summary.
In contrast to our Hello Genomics Calculation you don't have to write a summary nor any output-file. In fact you should
not even write any file except for temporary files.
Furthermore serve the website on port 8000 and test your application by starting it via
docker-compose -f <my_docker_compose> up
and navigate to http://localhost:8000 to see the your visualization.
Docker provides a mechanism called healthcheck which allows you to check if a container is still working. In our example we serve two websites:
The latter can be used together with the command line tool curl to implement a Docker healthcheck as follows:
Dockerfile:
THCHECK CMD curl --fail http://localhost:8000/health || exit 1
Currently we do not support WebSockets as bokeh does. Please let us know if you want this restriction removed.
This visualization is licenced under the MIT licence and uses plotly.js v1.30.0, licensed under the MIT license.