Tremendous advances in the field of biotechnology enable researchers and scientists to produce and obtain a diverse and huge amount of biological data. Therefore, there is a corresponding increase in the way of visualizing the biological data to represent information and science through art in a concise and meaningful way.
In this respect, Plotly has recently emerged and it can be used to create interactive charts and state-of-the-art graphs in a wide range of visualization applications including visualization of sequences, genomes, alignments, gene expressions.
So, I have wanted to learn how to use this library with Python, create some great charts and shared them.
-
Create a directory and download all files or clone the repository via Git using the following command:
git clone https://github.com/furkanmtorun/Plotly_BioVisualization.git
-
Install the required packages if you do not already:
pip install -r requirements.txt
-
Then, the turn to run it:
python Plotly_BioVisualization.py
-
It's ready to use now! Open your web browser and go to:
http://127.0.0.1:8050
If you did not install pip yet, please follow the instruction here.
In the development process, Python 3 has been used. The use of Python 2.x might cause compatibility issues.
-
-
Purpose: It allows you to illustrate the mutations or other changes on the corresponding positions of amino acids within the protein sequence together with the protein domains.
-
Data structure: JSON / Dict =
{ x: [], y: [], domains: [], mutationGroups: [] }
-
Coding (just review the code, the comments are over there!):
-
-
-
Purpose: Manhattan Plot is a type of scatter plot and commonly used in genome-wide association studies (GWAS) to visualize display significant SNPs efficiently.
The genome-wide significance threshold was set as 5e-8 and plotted with green line, and the most significant SNPs are colored in red.
-
Coding (just review the code, the comments are over there!):
-
How it looks like?
-
- Hossain, S. (2019). Visualization of Bioinformatics Data with Dash Bio. Proceedings of the 18th Python in Science Conference. doi: 10.25080/majora-7ddc1dd1-012.
- Plotly Dash Bio Announcement Blog Post: https://medium.com/plotly/announcing-dash-bio-ed8835d5da0c
- Plotly Dash Bio Page: https://dash.plot.ly/dash-bio
- Alignment Chart Details: https://dash.plot.ly/dash-bio/alignmentchart
- Manhattan Plot Details: https://dash.plot.ly/dash-bio/manhattanplot
- Needle Plot Details: https://dash.plot.ly/dash-bio/needleplot
- Plotly Bioinformatics Notebook: https://plot.ly/python/v3/ipython-notebooks/bioinformatics/
- Plotly HTML Components Page: https://dash.plot.ly/dash-html-components
- Bulma.css Documentation: https://bulma.io/documentation/
- Create and share beautiful screenshots: https://carbon.now.sh/
Thanks for all these resources!
I would be very happy to see any feedback and contributions on the repository.
I will keep continuing to append new interactive graphs and figures as much as I can.
Furkan Torun — furkanmtorun@gmail.com
Twitter: @furkanmtorun
Website: furkanmtorun.github.io
Academics: Google Scholar Profile