SlideShare a Scribd company logo
Data visualization with Python and SVG
Plotting an RNA secondary structure
Sukjun Kim
The Baek Research Group of Computational Biology
Seoul National University
April 11th, 2015
Special Lecture at Biospin Group
1
2
Plotting libraries for data visualization
• They have their own language for plotting.
• They should be installed prior to use.
• There are dependencies on upper level libraries.
• They are appropriate for high level graphics.
• We cannot customize a plot at low level.
R matplotlib d3.js
gnuplot Origin PgfPlots
PLplot Pyxplot Grace
3
SVG(Scalable Vector Graphics)
• XML-based vector image format for two-dimensional graphics.
• The SVG specification is an open standard developed by the
World Wide Web Consortium (W3C) since 1999.
• As XML files, SVG images can be created and edited with any
text editor.
• All major modern web browsers – including Mozilla Firefox,
Internet Explorer, Google Chrome, Opera, and Safari – have
at least some degree of SVG rendering support.
(Wikipedia – Scalable Vector Graphics)
Data visualization by writing SVG document
• SVG markup language is open standard and easy to learn.
• Not only python but also any programming language can be used.
• It requires no dependent libraries.
• We can customize graphic elements at low level.
4
Structure of SVG document
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg"
version="1.1" width="100" height="100">
<circle cx="50" cy="50" r="40" stroke="green"
stroke-width="4" fill="yellow"/>
</svg>
XML tag
declaration of
DOCTYPE
start of SVG tag
end of SVG tag
contents of
SVG document
SVG elements
• SVG has some predefined shape elements.
• rectangle <rect>, circle <circle>, ellipse <ellipse>, line <line>,
polyline <polyline>, polygon <polygon>, path <path>, ...
• group <g>, hyperlink <a>, text <text>, ...
40
(50,50)
RNA secondary structural data
## microRNA structural data
seq = 'CCACCACUUAAACGUGGAUGUACUUGCUUUGAAACUAAAGAAGUAAGUGCUUCCAUGUUUUGGUGAUGG'
dotbr = '(((.((((.(((((((((.(((((((((((.........))))))))))).))))))))).)))).)))'
pairs = [(0,68), (1,67), (2,66), (4,64), (5,63), (6,62), ... , (29,39)]
coor = [(69.515,526.033), (69.515,511.033), ... , (84.515,526.033)]
5
RNAplotRNAfoldseq dotbr, pairs coor
How to generate RNA structural data?
(Vienna RNA package, http://www.tbi.univie.ac.at/RNA/)
• seq: RNA sequence.
• dotbr: dot-bracket notation which is used
to define RNA secondary structure.
• pairs: base-pairing information.
• coor: x and y coordinates for nucleotides.
This is our final
image to plot
Writing a SVG tag in python script
6
out = []
out.append('<svg xmlns="http://www.w3.org/2000/svg" version="1.1">n')
## svg elements here
out.append('</svg>n')
open('rna.svg', 'w').write(''.join(out))
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
</svg>
rna.py
rna.svg
SVG documents basically requires open and close SVG tags
SVG Polyline
7
<polyline points="10,10 20,10 10,20 20,20"
style="fill:none;stroke:black;stroke-width:3"/>
(10,10) (20,10)
(10,20) (20,20)
fill:none
stroke:black
stroke-width:3
Drawing phosphate backbone
8
points = ' '.join(['%.3f,%.3f'%(x, y) for x, y in coor])
out.append('<polyline points="%s" style="fill:none;
stroke:black; stroke-width:1;"/>n'%(points))
coor = [(69.515,526.033), (69.515,511.033), ... , (84.515,526.033)]
In DNA and RNA, phosphate backbone is regarded as a
skeleton of the molecule. The skeleton will be represented by
SVG <polyline> tag.
We have x and y coordinates of each nucleotide as below.
Using the coordination information, we can specifiy points
attribute of polyline tag.
SVG Line
9
<line x1="0" y1="0" x2="20" y2="20"
style="stroke:red;stroke-width:2"/>
(0,0)
(20,20)
stroke:red
stroke-width:2
Drawing base-pairing
10
for i, j in pairs:
x1, y1 = coor[i]
x2, y2 = coor[j]
out.append('<line x1="%.3f" y1="%.3f" x2="%.3f" y2="%.3f"
style="stroke:black; stroke-width:1;"/>n'%(x1, y1, x2, y2))
pairs = [(0,68), (1,67), (2,66), (4,64), (5,63), (6,62), ... , (29,39)]
coor = [(69.515,526.033), (69.515,511.033), ... , (84.515,526.033)]
Watson-Crick base pairs occur between A and U, and between
C and G. We will use <line> tag to represent the hydrogen
bonds.
In addition to a coordination information, we also have base-
pairing information in the form of tuple carrying the indexes of
two nucleotides.
From two types of data, base-pairing information can be
visualized as a simple line.
SVG Circle
11
<circle cx="50" cy="50" r="20"
style="fill:red;stroke:black;stroke-width:3"/>
(50,50)
fill:red
stroke:black
40
stroke-width:3
SVG Text
12
<text x="0" y="15" font-size="15"
style="fill:blue">I love SVG!</text>
(0,15)
fill:blue
font-size="15"I love SVG!
Drawing nucleotides
13
A
Each nucleotide will be represented by one character text
enclosed with a circle.
seq = 'CCACCACUUAAACGUGGAUGUACUUGCUUUGAAACUAAAGAAGUAAGUGCUUCCAUGUUUUGGUGAUGG'
coor = [(69.515,526.033), (69.515,511.033), ... , (84.515,526.033)]
<text>
<circle>
for i, base in enumerate(seq):
x, y = coor[i]
out.append('<circle cx="%.3f" cy="%.3f" r="%.3f"
style="fill:white; stroke:black; stroke-width:1"/>n'%(x, y, 5))
out.append('<text x="%.3f" y="%.3f" font-size="6" text-
anchor="middle" style="fill:black">%s</text>n'%(x, y+6*0.35, base))
RNA sequence and a coordination information is required.
<text> tag should be written after the <circle> tag.
Content of the python script
14
## microRNA structural data
seq = 'CCACCACUUAAACGUGGAUGUACUUGCUUUGAAACUAAAGAAGUAAGUGCUUCCAUGUUUUGGUGAUGG'
dotbr = '(((.((((.(((((((((.(((((((((((.........))))))))))).))))))))).)))).)))'
pairs = [(0, 68), (1, 67), (2, 66), (4, 64), (5, 63), (6, 62), (7, 61), (9, 59), (10, 58), (11, 57), (12, 56), (13, 55), (14,
54), (15, 53), (16, 52), (17, 51), (19, 49), (20, 48), (21, 47), (22, 46), (23, 45), (24, 44), (25, 43), (26, 42), (27, 41),
(28, 40), (29, 39)]
coor =
[(69.515,526.033),(69.515,511.033),(69.515,496.033),(61.778,483.306),(69.515,469.506),(69.515,454.506),(69.515,439.506),(69.
515,424.506),(62.691,412.302),(69.515,400.099),(69.515,385.099),(69.515,370.099),(69.515,355.099),(69.515,340.099),(69.515,3
25.099),(69.515,310.099),(69.515,295.099),(69.515,280.099),(61.778,266.298),(69.515,253.571),(69.515,238.571),(69.515,223.57
1),(69.515,208.571),(69.515,193.571),(69.515,178.571),(69.515,163.571),(69.515,148.571),(69.515,133.571),(69.515,118.571),(6
9.515,103.571),(56.481,95.317),(50.000,81.317),(52.139,66.039),(62.216,54.357),(77.015,50.000),(91.814,54.357),(101.891,66.0
39),(104.030,81.317),(97.549,95.317),(84.515,103.571),(84.515,118.571),(84.515,133.571),(84.515,148.571),(84.515,163.571),(8
4.515,178.571),(84.515,193.571),(84.515,208.571),(84.515,223.571),(84.515,238.571),(84.515,253.571),(92.252,266.298),(84.515
,280.099),(84.515,295.099),(84.515,310.099),(84.515,325.099),(84.515,340.099),(84.515,355.099),(84.515,370.099),(84.515,385.
099),(84.515,400.099),(91.339,412.302),(84.515,424.506),(84.515,439.506),(84.515,454.506),(84.515,469.506),(92.252,483.306),
(84.515,496.033),(84.515,511.033),(84.515,526.033)]
out = []
out.append('<svg xmlns="http://www.w3.org/2000/svg" version="1.1">n')
## [1] phosphate backbone - <polyline> tag
points = ' '.join(['%.3f,%.3f'%(x, y) for x, y in coor])
out.append('<polyline points="%s" style="fill:none; stroke:black; stroke-width:1;"/>n'%(points))
## [2] base-pairing - <line> tag
for i, j in pairs:
x1, y1 = coor[i]
x2, y2 = coor[j]
out.append('<line x1="%.3f" y1="%.3f" x2="%.3f" y2="%.3f" style="stroke:black; stroke-width:1;"/>n'%(x1, y1, x2, y2))
## [3] nucleotide - <circle> and <text> tags
for i, base in enumerate(seq):
x, y = coor[i]
out.append('<circle cx="%.3f" cy="%.3f" r="%.3f" style="fill:white; stroke:black; stroke-width:1"/>n'%(x, y, 5))
out.append('<text x="%.3f" y="%.3f" font-size="6" text-anchor="middle" style="fill:black">%s</text>n'%(x, y+6*0.35,
base))
out.append('</svg>n')
open('rna.svg', 'w').write(''.join(out))
How to use other SVG tags? Go to w3schools.com!
16
Real examples
with Python and SVG
17
reciPlot
<text>
<polygon>
Plot for visualizing
the tissue-specific
expression of genes.
18
escPlot
<line>
<text>
<path>
<circle>
<polyline>
Plot for representing
expression, structure, and
conservation data of RNA
collectively in a single plot.
wheelPlot
19
<circle>
<polyline>
<path> <line>
<rect> <text>
Plot for visualizing
all suboptimal RNA
secondary structures.
Conclusions
20
• There are many graphic tools and libraries for data visualization.
• These software options provide a function limited to high level graphics.
• No dependent libraries or significant time investment are required for
learning a specific language to write SVG documents.
• If you want to plot a noncanonical type of graph and customize it at low
level, writing a SVG document with Python will be the best solution that
meets your purpose.
Thank you!
Have a nice weekend.
21
Ad

More Related Content

What's hot (10)

ชมพูทวีป คือ แผ่นดินที่เรียกว่าประเทศอินเดียในกาลก่อน แต่ในสมัยปัจจุบันเป็นที...
ชมพูทวีป คือ แผ่นดินที่เรียกว่าประเทศอินเดียในกาลก่อน แต่ในสมัยปัจจุบันเป็นที...ชมพูทวีป คือ แผ่นดินที่เรียกว่าประเทศอินเดียในกาลก่อน แต่ในสมัยปัจจุบันเป็นที...
ชมพูทวีป คือ แผ่นดินที่เรียกว่าประเทศอินเดียในกาลก่อน แต่ในสมัยปัจจุบันเป็นที...
plam1338
 
Hideitsu Hino
Hideitsu HinoHideitsu Hino
Hideitsu Hino
Suurist
 
Chain rule
Chain ruleChain rule
Chain rule
Lorie Blickhan
 
00000070 1 20130107-130231
00000070 1 20130107-13023100000070 1 20130107-130231
00000070 1 20130107-130231
Niwat Namisa
 
Cocos2dを使ったゲーム作成の事例
Cocos2dを使ったゲーム作成の事例Cocos2dを使ったゲーム作成の事例
Cocos2dを使ったゲーム作成の事例
Yuichi Higuchi
 
Scrollytelling
ScrollytellingScrollytelling
Scrollytelling
Baron Watts
 
Belfast JUG, SIMD (Vectorial) Operations
Belfast JUG, SIMD (Vectorial) OperationsBelfast JUG, SIMD (Vectorial) Operations
Belfast JUG, SIMD (Vectorial) Operations
Hudson Mendes
 
Metadata php
Metadata phpMetadata php
Metadata php
Wahyu Bimo
 
MongoDB Indexing Constraints and Creative Schemas
MongoDB Indexing Constraints and Creative SchemasMongoDB Indexing Constraints and Creative Schemas
MongoDB Indexing Constraints and Creative Schemas
MongoDB
 
OPTIMIZATION OF DOPANT DIFFUSION AND ION IMPLANTATION TO INCREASE INTEGRATION...
OPTIMIZATION OF DOPANT DIFFUSION AND ION IMPLANTATION TO INCREASE INTEGRATION...OPTIMIZATION OF DOPANT DIFFUSION AND ION IMPLANTATION TO INCREASE INTEGRATION...
OPTIMIZATION OF DOPANT DIFFUSION AND ION IMPLANTATION TO INCREASE INTEGRATION...
ijrap
 
ชมพูทวีป คือ แผ่นดินที่เรียกว่าประเทศอินเดียในกาลก่อน แต่ในสมัยปัจจุบันเป็นที...
ชมพูทวีป คือ แผ่นดินที่เรียกว่าประเทศอินเดียในกาลก่อน แต่ในสมัยปัจจุบันเป็นที...ชมพูทวีป คือ แผ่นดินที่เรียกว่าประเทศอินเดียในกาลก่อน แต่ในสมัยปัจจุบันเป็นที...
ชมพูทวีป คือ แผ่นดินที่เรียกว่าประเทศอินเดียในกาลก่อน แต่ในสมัยปัจจุบันเป็นที...
plam1338
 
Hideitsu Hino
Hideitsu HinoHideitsu Hino
Hideitsu Hino
Suurist
 
00000070 1 20130107-130231
00000070 1 20130107-13023100000070 1 20130107-130231
00000070 1 20130107-130231
Niwat Namisa
 
Cocos2dを使ったゲーム作成の事例
Cocos2dを使ったゲーム作成の事例Cocos2dを使ったゲーム作成の事例
Cocos2dを使ったゲーム作成の事例
Yuichi Higuchi
 
Belfast JUG, SIMD (Vectorial) Operations
Belfast JUG, SIMD (Vectorial) OperationsBelfast JUG, SIMD (Vectorial) Operations
Belfast JUG, SIMD (Vectorial) Operations
Hudson Mendes
 
MongoDB Indexing Constraints and Creative Schemas
MongoDB Indexing Constraints and Creative SchemasMongoDB Indexing Constraints and Creative Schemas
MongoDB Indexing Constraints and Creative Schemas
MongoDB
 
OPTIMIZATION OF DOPANT DIFFUSION AND ION IMPLANTATION TO INCREASE INTEGRATION...
OPTIMIZATION OF DOPANT DIFFUSION AND ION IMPLANTATION TO INCREASE INTEGRATION...OPTIMIZATION OF DOPANT DIFFUSION AND ION IMPLANTATION TO INCREASE INTEGRATION...
OPTIMIZATION OF DOPANT DIFFUSION AND ION IMPLANTATION TO INCREASE INTEGRATION...
ijrap
 

Viewers also liked (20)

Data Visualization(s) Using Python
Data Visualization(s) Using PythonData Visualization(s) Using Python
Data Visualization(s) Using Python
Aniket Maithani
 
Python Científico
Python CientíficoPython Científico
Python Científico
Márcio Ramos
 
A Data Scientist Job Map Visualization Tool using Python, D3.js and MySQL
A Data Scientist Job Map Visualization Tool using Python, D3.js and MySQLA Data Scientist Job Map Visualization Tool using Python, D3.js and MySQL
A Data Scientist Job Map Visualization Tool using Python, D3.js and MySQL
Andrea Gigli
 
3 neomezená veřejná zakázka
3 neomezená veřejná zakázka3 neomezená veřejná zakázka
3 neomezená veřejná zakázka
ondrejbaarcz
 
Managementbijeenkomst ktv
Managementbijeenkomst ktvManagementbijeenkomst ktv
Managementbijeenkomst ktv
Julian Laan
 
2 omezená veřejná zakázka
2 omezená veřejná zakázka2 omezená veřejná zakázka
2 omezená veřejná zakázka
ondrejbaarcz
 
เทคน คการส บค_นบน google
เทคน คการส บค_นบน googleเทคน คการส บค_นบน google
เทคน คการส บค_นบน google
Nuumint
 
ว ธ สร_างบล_อกก_บ blogger
ว ธ สร_างบล_อกก_บ bloggerว ธ สร_างบล_อกก_บ blogger
ว ธ สร_างบล_อกก_บ blogger
Nuumint
 
เทคน คการส บค_นบน google
เทคน คการส บค_นบน googleเทคน คการส บค_นบน google
เทคน คการส บค_นบน google
Nuumint
 
1 nejdulezitejsi pojmy a otazky souvisejici s verejnymi zakazkami v polsku
1 nejdulezitejsi pojmy a otazky souvisejici s verejnymi zakazkami v polsku1 nejdulezitejsi pojmy a otazky souvisejici s verejnymi zakazkami v polsku
1 nejdulezitejsi pojmy a otazky souvisejici s verejnymi zakazkami v polsku
ondrejbaarcz
 
Narkoba
NarkobaNarkoba
Narkoba
yunirfaithful
 
Wonderful waves
Wonderful wavesWonderful waves
Wonderful waves
Frederick Green
 
Thailand IT Start-Up Community: Progress, Status, Challenges & Policy Recomme...
Thailand IT Start-Up Community: Progress, Status, Challenges & Policy Recomme...Thailand IT Start-Up Community: Progress, Status, Challenges & Policy Recomme...
Thailand IT Start-Up Community: Progress, Status, Challenges & Policy Recomme...
thaistartupreview
 
C optimization notes
C optimization notesC optimization notes
C optimization notes
Fyaz Ghaffar
 
seo training in mahabubnagar
seo training in mahabubnagarseo training in mahabubnagar
seo training in mahabubnagar
Subhash Malgam
 
SEO Training in Mahabubnagar
SEO Training in MahabubnagarSEO Training in Mahabubnagar
SEO Training in Mahabubnagar
Subhash Malgam
 
ข นตอนการต_ดต__ง โปรแกรม windows 8 บน vmware
ข  นตอนการต_ดต__ง โปรแกรม windows  8 บน vmwareข  นตอนการต_ดต__ง โปรแกรม windows  8 บน vmware
ข นตอนการต_ดต__ง โปรแกรม windows 8 บน vmware
Nuumint
 
ว ธ สร_างบล_อกก_บ blogger
ว ธ สร_างบล_อกก_บ bloggerว ธ สร_างบล_อกก_บ blogger
ว ธ สร_างบล_อกก_บ blogger
Nuumint
 
Digital marketing presentation
Digital marketing presentationDigital marketing presentation
Digital marketing presentation
Subhash Malgam
 
Newton and feynman
Newton and feynmanNewton and feynman
Newton and feynman
Frederick Green
 
Data Visualization(s) Using Python
Data Visualization(s) Using PythonData Visualization(s) Using Python
Data Visualization(s) Using Python
Aniket Maithani
 
A Data Scientist Job Map Visualization Tool using Python, D3.js and MySQL
A Data Scientist Job Map Visualization Tool using Python, D3.js and MySQLA Data Scientist Job Map Visualization Tool using Python, D3.js and MySQL
A Data Scientist Job Map Visualization Tool using Python, D3.js and MySQL
Andrea Gigli
 
3 neomezená veřejná zakázka
3 neomezená veřejná zakázka3 neomezená veřejná zakázka
3 neomezená veřejná zakázka
ondrejbaarcz
 
Managementbijeenkomst ktv
Managementbijeenkomst ktvManagementbijeenkomst ktv
Managementbijeenkomst ktv
Julian Laan
 
2 omezená veřejná zakázka
2 omezená veřejná zakázka2 omezená veřejná zakázka
2 omezená veřejná zakázka
ondrejbaarcz
 
เทคน คการส บค_นบน google
เทคน คการส บค_นบน googleเทคน คการส บค_นบน google
เทคน คการส บค_นบน google
Nuumint
 
ว ธ สร_างบล_อกก_บ blogger
ว ธ สร_างบล_อกก_บ bloggerว ธ สร_างบล_อกก_บ blogger
ว ธ สร_างบล_อกก_บ blogger
Nuumint
 
เทคน คการส บค_นบน google
เทคน คการส บค_นบน googleเทคน คการส บค_นบน google
เทคน คการส บค_นบน google
Nuumint
 
1 nejdulezitejsi pojmy a otazky souvisejici s verejnymi zakazkami v polsku
1 nejdulezitejsi pojmy a otazky souvisejici s verejnymi zakazkami v polsku1 nejdulezitejsi pojmy a otazky souvisejici s verejnymi zakazkami v polsku
1 nejdulezitejsi pojmy a otazky souvisejici s verejnymi zakazkami v polsku
ondrejbaarcz
 
Thailand IT Start-Up Community: Progress, Status, Challenges & Policy Recomme...
Thailand IT Start-Up Community: Progress, Status, Challenges & Policy Recomme...Thailand IT Start-Up Community: Progress, Status, Challenges & Policy Recomme...
Thailand IT Start-Up Community: Progress, Status, Challenges & Policy Recomme...
thaistartupreview
 
C optimization notes
C optimization notesC optimization notes
C optimization notes
Fyaz Ghaffar
 
seo training in mahabubnagar
seo training in mahabubnagarseo training in mahabubnagar
seo training in mahabubnagar
Subhash Malgam
 
SEO Training in Mahabubnagar
SEO Training in MahabubnagarSEO Training in Mahabubnagar
SEO Training in Mahabubnagar
Subhash Malgam
 
ข นตอนการต_ดต__ง โปรแกรม windows 8 บน vmware
ข  นตอนการต_ดต__ง โปรแกรม windows  8 บน vmwareข  นตอนการต_ดต__ง โปรแกรม windows  8 บน vmware
ข นตอนการต_ดต__ง โปรแกรม windows 8 บน vmware
Nuumint
 
ว ธ สร_างบล_อกก_บ blogger
ว ธ สร_างบล_อกก_บ bloggerว ธ สร_างบล_อกก_บ blogger
ว ธ สร_างบล_อกก_บ blogger
Nuumint
 
Digital marketing presentation
Digital marketing presentationDigital marketing presentation
Digital marketing presentation
Subhash Malgam
 
Ad

Similar to Data visualization with Python and SVG (20)

2013추계학술대회 인쇄용
2013추계학술대회 인쇄용2013추계학술대회 인쇄용
2013추계학술대회 인쇄용
Byung Kook Ha
 
SVGo: a Go Library for SVG generation
SVGo: a Go Library for SVG generationSVGo: a Go Library for SVG generation
SVGo: a Go Library for SVG generation
Anthony Starks
 
community detection
community detectioncommunity detection
community detection
kamal berahmand
 
A new method of gridding for spot detection in microarray images
A new method of gridding for spot detection in microarray imagesA new method of gridding for spot detection in microarray images
A new method of gridding for spot detection in microarray images
Alexander Decker
 
A new method of gridding for spot detection in microarray images
A new method of gridding for spot detection in microarray imagesA new method of gridding for spot detection in microarray images
A new method of gridding for spot detection in microarray images
Alexander Decker
 
Speaker Diarization
Speaker DiarizationSpeaker Diarization
Speaker Diarization
HONGJOO LEE
 
SVGo workshop
SVGo workshopSVGo workshop
SVGo workshop
Anthony Starks
 
論文紹介:Masked Vision and Language Modeling for Multi-modal Representation Learning
論文紹介:Masked Vision and Language Modeling for Multi-modal Representation Learning論文紹介:Masked Vision and Language Modeling for Multi-modal Representation Learning
論文紹介:Masked Vision and Language Modeling for Multi-modal Representation Learning
Toru Tamaki
 
Html5 canvas
Html5 canvasHtml5 canvas
Html5 canvas
Gary Yeh
 
Hadoop con 2016_9_10_王經篤(Jing-Doo Wang)
Hadoop con 2016_9_10_王經篤(Jing-Doo Wang)Hadoop con 2016_9_10_王經篤(Jing-Doo Wang)
Hadoop con 2016_9_10_王經篤(Jing-Doo Wang)
Jing-Doo Wang
 
Julia: The language for future
Julia: The language for futureJulia: The language for future
Julia: The language for future
岳華 杜
 
Linked science presentation 25
Linked science presentation 25Linked science presentation 25
Linked science presentation 25
Francesco Osborne
 
Introduction to Julia
Introduction to JuliaIntroduction to Julia
Introduction to Julia
岳華 杜
 
Chapter3_Visualizations2.pdf
Chapter3_Visualizations2.pdfChapter3_Visualizations2.pdf
Chapter3_Visualizations2.pdf
MekiyaShigute1
 
Python for Chemistry
Python for ChemistryPython for Chemistry
Python for Chemistry
guest5929fa7
 
Python for Chemistry
Python for ChemistryPython for Chemistry
Python for Chemistry
baoilleach
 
The Language for future-julia
The Language for future-juliaThe Language for future-julia
The Language for future-julia
岳華 杜
 
KDD17Tutorial_final (1).pdf
KDD17Tutorial_final (1).pdfKDD17Tutorial_final (1).pdf
KDD17Tutorial_final (1).pdf
ssuserf2f0fe
 
lecture-Basic-programing-R-1-basic-eng.pptx
lecture-Basic-programing-R-1-basic-eng.pptxlecture-Basic-programing-R-1-basic-eng.pptx
lecture-Basic-programing-R-1-basic-eng.pptx
ThoVyNguynVng
 
Training Graph Convolutional Neural Networks in Graph Database
Training Graph Convolutional Neural Networks in Graph DatabaseTraining Graph Convolutional Neural Networks in Graph Database
Training Graph Convolutional Neural Networks in Graph Database
TigerGraph
 
2013추계학술대회 인쇄용
2013추계학술대회 인쇄용2013추계학술대회 인쇄용
2013추계학술대회 인쇄용
Byung Kook Ha
 
SVGo: a Go Library for SVG generation
SVGo: a Go Library for SVG generationSVGo: a Go Library for SVG generation
SVGo: a Go Library for SVG generation
Anthony Starks
 
A new method of gridding for spot detection in microarray images
A new method of gridding for spot detection in microarray imagesA new method of gridding for spot detection in microarray images
A new method of gridding for spot detection in microarray images
Alexander Decker
 
A new method of gridding for spot detection in microarray images
A new method of gridding for spot detection in microarray imagesA new method of gridding for spot detection in microarray images
A new method of gridding for spot detection in microarray images
Alexander Decker
 
Speaker Diarization
Speaker DiarizationSpeaker Diarization
Speaker Diarization
HONGJOO LEE
 
論文紹介:Masked Vision and Language Modeling for Multi-modal Representation Learning
論文紹介:Masked Vision and Language Modeling for Multi-modal Representation Learning論文紹介:Masked Vision and Language Modeling for Multi-modal Representation Learning
論文紹介:Masked Vision and Language Modeling for Multi-modal Representation Learning
Toru Tamaki
 
Html5 canvas
Html5 canvasHtml5 canvas
Html5 canvas
Gary Yeh
 
Hadoop con 2016_9_10_王經篤(Jing-Doo Wang)
Hadoop con 2016_9_10_王經篤(Jing-Doo Wang)Hadoop con 2016_9_10_王經篤(Jing-Doo Wang)
Hadoop con 2016_9_10_王經篤(Jing-Doo Wang)
Jing-Doo Wang
 
Julia: The language for future
Julia: The language for futureJulia: The language for future
Julia: The language for future
岳華 杜
 
Linked science presentation 25
Linked science presentation 25Linked science presentation 25
Linked science presentation 25
Francesco Osborne
 
Introduction to Julia
Introduction to JuliaIntroduction to Julia
Introduction to Julia
岳華 杜
 
Chapter3_Visualizations2.pdf
Chapter3_Visualizations2.pdfChapter3_Visualizations2.pdf
Chapter3_Visualizations2.pdf
MekiyaShigute1
 
Python for Chemistry
Python for ChemistryPython for Chemistry
Python for Chemistry
guest5929fa7
 
Python for Chemistry
Python for ChemistryPython for Chemistry
Python for Chemistry
baoilleach
 
The Language for future-julia
The Language for future-juliaThe Language for future-julia
The Language for future-julia
岳華 杜
 
KDD17Tutorial_final (1).pdf
KDD17Tutorial_final (1).pdfKDD17Tutorial_final (1).pdf
KDD17Tutorial_final (1).pdf
ssuserf2f0fe
 
lecture-Basic-programing-R-1-basic-eng.pptx
lecture-Basic-programing-R-1-basic-eng.pptxlecture-Basic-programing-R-1-basic-eng.pptx
lecture-Basic-programing-R-1-basic-eng.pptx
ThoVyNguynVng
 
Training Graph Convolutional Neural Networks in Graph Database
Training Graph Convolutional Neural Networks in Graph DatabaseTraining Graph Convolutional Neural Networks in Graph Database
Training Graph Convolutional Neural Networks in Graph Database
TigerGraph
 
Ad

Recently uploaded (20)

lecture_13 tree in mmmmmmmm mmmmmfftro.pptx
lecture_13 tree in mmmmmmmm     mmmmmfftro.pptxlecture_13 tree in mmmmmmmm     mmmmmfftro.pptx
lecture_13 tree in mmmmmmmm mmmmmfftro.pptx
sarajafffri058
 
Feature Engineering for Electronic Health Record Systems
Feature Engineering for Electronic Health Record SystemsFeature Engineering for Electronic Health Record Systems
Feature Engineering for Electronic Health Record Systems
Process mining Evangelist
 
Process Mining as Enabler for Digital Transformations
Process Mining as Enabler for Digital TransformationsProcess Mining as Enabler for Digital Transformations
Process Mining as Enabler for Digital Transformations
Process mining Evangelist
 
Mining a Global Trade Process with Data Science - Microsoft
Mining a Global Trade Process with Data Science - MicrosoftMining a Global Trade Process with Data Science - Microsoft
Mining a Global Trade Process with Data Science - Microsoft
Process mining Evangelist
 
2-Raction quotient_١٠٠١٤٦.ppt of physical chemisstry
2-Raction quotient_١٠٠١٤٦.ppt of physical chemisstry2-Raction quotient_١٠٠١٤٦.ppt of physical chemisstry
2-Raction quotient_١٠٠١٤٦.ppt of physical chemisstry
bastakwyry
 
national income & related aggregates (1)(1).pptx
national income & related aggregates (1)(1).pptxnational income & related aggregates (1)(1).pptx
national income & related aggregates (1)(1).pptx
j2492618
 
2024 Digital Equity Accelerator Report.pdf
2024 Digital Equity Accelerator Report.pdf2024 Digital Equity Accelerator Report.pdf
2024 Digital Equity Accelerator Report.pdf
dominikamizerska1
 
Dynamics 365 Business Rules Dynamics Dynamics
Dynamics 365 Business Rules Dynamics DynamicsDynamics 365 Business Rules Dynamics Dynamics
Dynamics 365 Business Rules Dynamics Dynamics
heyoubro69
 
Fundamentals of Data Analysis, its types, tools, algorithms
Fundamentals of Data Analysis, its types, tools, algorithmsFundamentals of Data Analysis, its types, tools, algorithms
Fundamentals of Data Analysis, its types, tools, algorithms
priyaiyerkbcsc
 
Process Mining Machine Recoveries to Reduce Downtime
Process Mining Machine Recoveries to Reduce DowntimeProcess Mining Machine Recoveries to Reduce Downtime
Process Mining Machine Recoveries to Reduce Downtime
Process mining Evangelist
 
problem solving.presentation slideshow bsc nursing
problem solving.presentation slideshow bsc nursingproblem solving.presentation slideshow bsc nursing
problem solving.presentation slideshow bsc nursing
vishnudathas123
 
AWS RDS Presentation to make concepts easy.pptx
AWS RDS Presentation to make concepts easy.pptxAWS RDS Presentation to make concepts easy.pptx
AWS RDS Presentation to make concepts easy.pptx
bharatkumarbhojwani
 
AWS Certified Machine Learning Slides.pdf
AWS Certified Machine Learning Slides.pdfAWS Certified Machine Learning Slides.pdf
AWS Certified Machine Learning Slides.pdf
philsparkshome
 
Multi-tenant Data Pipeline Orchestration
Multi-tenant Data Pipeline OrchestrationMulti-tenant Data Pipeline Orchestration
Multi-tenant Data Pipeline Orchestration
Romi Kuntsman
 
Automation Platforms and Process Mining - success story
Automation Platforms and Process Mining - success storyAutomation Platforms and Process Mining - success story
Automation Platforms and Process Mining - success story
Process mining Evangelist
 
indonesia-gen-z-report-2024 Gen Z (born between 1997 and 2012) is currently t...
indonesia-gen-z-report-2024 Gen Z (born between 1997 and 2012) is currently t...indonesia-gen-z-report-2024 Gen Z (born between 1997 and 2012) is currently t...
indonesia-gen-z-report-2024 Gen Z (born between 1997 and 2012) is currently t...
disnakertransjabarda
 
Sets theories and applications that can used to imporve knowledge
Sets theories and applications that can used to imporve knowledgeSets theories and applications that can used to imporve knowledge
Sets theories and applications that can used to imporve knowledge
saumyasl2020
 
Automated Melanoma Detection via Image Processing.pptx
Automated Melanoma Detection via Image Processing.pptxAutomated Melanoma Detection via Image Processing.pptx
Automated Melanoma Detection via Image Processing.pptx
handrymaharjan23
 
Lesson 6-Interviewing in SHRM_updated.pdf
Lesson 6-Interviewing in SHRM_updated.pdfLesson 6-Interviewing in SHRM_updated.pdf
Lesson 6-Interviewing in SHRM_updated.pdf
hemelali11
 
Oral Malodor.pptx jsjshdhushehsidjjeiejdhfj
Oral Malodor.pptx jsjshdhushehsidjjeiejdhfjOral Malodor.pptx jsjshdhushehsidjjeiejdhfj
Oral Malodor.pptx jsjshdhushehsidjjeiejdhfj
maitripatel5301
 
lecture_13 tree in mmmmmmmm mmmmmfftro.pptx
lecture_13 tree in mmmmmmmm     mmmmmfftro.pptxlecture_13 tree in mmmmmmmm     mmmmmfftro.pptx
lecture_13 tree in mmmmmmmm mmmmmfftro.pptx
sarajafffri058
 
Feature Engineering for Electronic Health Record Systems
Feature Engineering for Electronic Health Record SystemsFeature Engineering for Electronic Health Record Systems
Feature Engineering for Electronic Health Record Systems
Process mining Evangelist
 
Process Mining as Enabler for Digital Transformations
Process Mining as Enabler for Digital TransformationsProcess Mining as Enabler for Digital Transformations
Process Mining as Enabler for Digital Transformations
Process mining Evangelist
 
Mining a Global Trade Process with Data Science - Microsoft
Mining a Global Trade Process with Data Science - MicrosoftMining a Global Trade Process with Data Science - Microsoft
Mining a Global Trade Process with Data Science - Microsoft
Process mining Evangelist
 
2-Raction quotient_١٠٠١٤٦.ppt of physical chemisstry
2-Raction quotient_١٠٠١٤٦.ppt of physical chemisstry2-Raction quotient_١٠٠١٤٦.ppt of physical chemisstry
2-Raction quotient_١٠٠١٤٦.ppt of physical chemisstry
bastakwyry
 
national income & related aggregates (1)(1).pptx
national income & related aggregates (1)(1).pptxnational income & related aggregates (1)(1).pptx
national income & related aggregates (1)(1).pptx
j2492618
 
2024 Digital Equity Accelerator Report.pdf
2024 Digital Equity Accelerator Report.pdf2024 Digital Equity Accelerator Report.pdf
2024 Digital Equity Accelerator Report.pdf
dominikamizerska1
 
Dynamics 365 Business Rules Dynamics Dynamics
Dynamics 365 Business Rules Dynamics DynamicsDynamics 365 Business Rules Dynamics Dynamics
Dynamics 365 Business Rules Dynamics Dynamics
heyoubro69
 
Fundamentals of Data Analysis, its types, tools, algorithms
Fundamentals of Data Analysis, its types, tools, algorithmsFundamentals of Data Analysis, its types, tools, algorithms
Fundamentals of Data Analysis, its types, tools, algorithms
priyaiyerkbcsc
 
Process Mining Machine Recoveries to Reduce Downtime
Process Mining Machine Recoveries to Reduce DowntimeProcess Mining Machine Recoveries to Reduce Downtime
Process Mining Machine Recoveries to Reduce Downtime
Process mining Evangelist
 
problem solving.presentation slideshow bsc nursing
problem solving.presentation slideshow bsc nursingproblem solving.presentation slideshow bsc nursing
problem solving.presentation slideshow bsc nursing
vishnudathas123
 
AWS RDS Presentation to make concepts easy.pptx
AWS RDS Presentation to make concepts easy.pptxAWS RDS Presentation to make concepts easy.pptx
AWS RDS Presentation to make concepts easy.pptx
bharatkumarbhojwani
 
AWS Certified Machine Learning Slides.pdf
AWS Certified Machine Learning Slides.pdfAWS Certified Machine Learning Slides.pdf
AWS Certified Machine Learning Slides.pdf
philsparkshome
 
Multi-tenant Data Pipeline Orchestration
Multi-tenant Data Pipeline OrchestrationMulti-tenant Data Pipeline Orchestration
Multi-tenant Data Pipeline Orchestration
Romi Kuntsman
 
Automation Platforms and Process Mining - success story
Automation Platforms and Process Mining - success storyAutomation Platforms and Process Mining - success story
Automation Platforms and Process Mining - success story
Process mining Evangelist
 
indonesia-gen-z-report-2024 Gen Z (born between 1997 and 2012) is currently t...
indonesia-gen-z-report-2024 Gen Z (born between 1997 and 2012) is currently t...indonesia-gen-z-report-2024 Gen Z (born between 1997 and 2012) is currently t...
indonesia-gen-z-report-2024 Gen Z (born between 1997 and 2012) is currently t...
disnakertransjabarda
 
Sets theories and applications that can used to imporve knowledge
Sets theories and applications that can used to imporve knowledgeSets theories and applications that can used to imporve knowledge
Sets theories and applications that can used to imporve knowledge
saumyasl2020
 
Automated Melanoma Detection via Image Processing.pptx
Automated Melanoma Detection via Image Processing.pptxAutomated Melanoma Detection via Image Processing.pptx
Automated Melanoma Detection via Image Processing.pptx
handrymaharjan23
 
Lesson 6-Interviewing in SHRM_updated.pdf
Lesson 6-Interviewing in SHRM_updated.pdfLesson 6-Interviewing in SHRM_updated.pdf
Lesson 6-Interviewing in SHRM_updated.pdf
hemelali11
 
Oral Malodor.pptx jsjshdhushehsidjjeiejdhfj
Oral Malodor.pptx jsjshdhushehsidjjeiejdhfjOral Malodor.pptx jsjshdhushehsidjjeiejdhfj
Oral Malodor.pptx jsjshdhushehsidjjeiejdhfj
maitripatel5301
 

Data visualization with Python and SVG

  • 1. Data visualization with Python and SVG Plotting an RNA secondary structure Sukjun Kim The Baek Research Group of Computational Biology Seoul National University April 11th, 2015 Special Lecture at Biospin Group 1
  • 2. 2 Plotting libraries for data visualization • They have their own language for plotting. • They should be installed prior to use. • There are dependencies on upper level libraries. • They are appropriate for high level graphics. • We cannot customize a plot at low level. R matplotlib d3.js gnuplot Origin PgfPlots PLplot Pyxplot Grace
  • 3. 3 SVG(Scalable Vector Graphics) • XML-based vector image format for two-dimensional graphics. • The SVG specification is an open standard developed by the World Wide Web Consortium (W3C) since 1999. • As XML files, SVG images can be created and edited with any text editor. • All major modern web browsers – including Mozilla Firefox, Internet Explorer, Google Chrome, Opera, and Safari – have at least some degree of SVG rendering support. (Wikipedia – Scalable Vector Graphics) Data visualization by writing SVG document • SVG markup language is open standard and easy to learn. • Not only python but also any programming language can be used. • It requires no dependent libraries. • We can customize graphic elements at low level.
  • 4. 4 Structure of SVG document <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="100" height="100"> <circle cx="50" cy="50" r="40" stroke="green" stroke-width="4" fill="yellow"/> </svg> XML tag declaration of DOCTYPE start of SVG tag end of SVG tag contents of SVG document SVG elements • SVG has some predefined shape elements. • rectangle <rect>, circle <circle>, ellipse <ellipse>, line <line>, polyline <polyline>, polygon <polygon>, path <path>, ... • group <g>, hyperlink <a>, text <text>, ... 40 (50,50)
  • 5. RNA secondary structural data ## microRNA structural data seq = 'CCACCACUUAAACGUGGAUGUACUUGCUUUGAAACUAAAGAAGUAAGUGCUUCCAUGUUUUGGUGAUGG' dotbr = '(((.((((.(((((((((.(((((((((((.........))))))))))).))))))))).)))).)))' pairs = [(0,68), (1,67), (2,66), (4,64), (5,63), (6,62), ... , (29,39)] coor = [(69.515,526.033), (69.515,511.033), ... , (84.515,526.033)] 5 RNAplotRNAfoldseq dotbr, pairs coor How to generate RNA structural data? (Vienna RNA package, http://www.tbi.univie.ac.at/RNA/) • seq: RNA sequence. • dotbr: dot-bracket notation which is used to define RNA secondary structure. • pairs: base-pairing information. • coor: x and y coordinates for nucleotides. This is our final image to plot
  • 6. Writing a SVG tag in python script 6 out = [] out.append('<svg xmlns="http://www.w3.org/2000/svg" version="1.1">n') ## svg elements here out.append('</svg>n') open('rna.svg', 'w').write(''.join(out)) <svg xmlns="http://www.w3.org/2000/svg" version="1.1"> </svg> rna.py rna.svg SVG documents basically requires open and close SVG tags
  • 7. SVG Polyline 7 <polyline points="10,10 20,10 10,20 20,20" style="fill:none;stroke:black;stroke-width:3"/> (10,10) (20,10) (10,20) (20,20) fill:none stroke:black stroke-width:3
  • 8. Drawing phosphate backbone 8 points = ' '.join(['%.3f,%.3f'%(x, y) for x, y in coor]) out.append('<polyline points="%s" style="fill:none; stroke:black; stroke-width:1;"/>n'%(points)) coor = [(69.515,526.033), (69.515,511.033), ... , (84.515,526.033)] In DNA and RNA, phosphate backbone is regarded as a skeleton of the molecule. The skeleton will be represented by SVG <polyline> tag. We have x and y coordinates of each nucleotide as below. Using the coordination information, we can specifiy points attribute of polyline tag.
  • 9. SVG Line 9 <line x1="0" y1="0" x2="20" y2="20" style="stroke:red;stroke-width:2"/> (0,0) (20,20) stroke:red stroke-width:2
  • 10. Drawing base-pairing 10 for i, j in pairs: x1, y1 = coor[i] x2, y2 = coor[j] out.append('<line x1="%.3f" y1="%.3f" x2="%.3f" y2="%.3f" style="stroke:black; stroke-width:1;"/>n'%(x1, y1, x2, y2)) pairs = [(0,68), (1,67), (2,66), (4,64), (5,63), (6,62), ... , (29,39)] coor = [(69.515,526.033), (69.515,511.033), ... , (84.515,526.033)] Watson-Crick base pairs occur between A and U, and between C and G. We will use <line> tag to represent the hydrogen bonds. In addition to a coordination information, we also have base- pairing information in the form of tuple carrying the indexes of two nucleotides. From two types of data, base-pairing information can be visualized as a simple line.
  • 11. SVG Circle 11 <circle cx="50" cy="50" r="20" style="fill:red;stroke:black;stroke-width:3"/> (50,50) fill:red stroke:black 40 stroke-width:3
  • 12. SVG Text 12 <text x="0" y="15" font-size="15" style="fill:blue">I love SVG!</text> (0,15) fill:blue font-size="15"I love SVG!
  • 13. Drawing nucleotides 13 A Each nucleotide will be represented by one character text enclosed with a circle. seq = 'CCACCACUUAAACGUGGAUGUACUUGCUUUGAAACUAAAGAAGUAAGUGCUUCCAUGUUUUGGUGAUGG' coor = [(69.515,526.033), (69.515,511.033), ... , (84.515,526.033)] <text> <circle> for i, base in enumerate(seq): x, y = coor[i] out.append('<circle cx="%.3f" cy="%.3f" r="%.3f" style="fill:white; stroke:black; stroke-width:1"/>n'%(x, y, 5)) out.append('<text x="%.3f" y="%.3f" font-size="6" text- anchor="middle" style="fill:black">%s</text>n'%(x, y+6*0.35, base)) RNA sequence and a coordination information is required. <text> tag should be written after the <circle> tag.
  • 14. Content of the python script 14 ## microRNA structural data seq = 'CCACCACUUAAACGUGGAUGUACUUGCUUUGAAACUAAAGAAGUAAGUGCUUCCAUGUUUUGGUGAUGG' dotbr = '(((.((((.(((((((((.(((((((((((.........))))))))))).))))))))).)))).)))' pairs = [(0, 68), (1, 67), (2, 66), (4, 64), (5, 63), (6, 62), (7, 61), (9, 59), (10, 58), (11, 57), (12, 56), (13, 55), (14, 54), (15, 53), (16, 52), (17, 51), (19, 49), (20, 48), (21, 47), (22, 46), (23, 45), (24, 44), (25, 43), (26, 42), (27, 41), (28, 40), (29, 39)] coor = [(69.515,526.033),(69.515,511.033),(69.515,496.033),(61.778,483.306),(69.515,469.506),(69.515,454.506),(69.515,439.506),(69. 515,424.506),(62.691,412.302),(69.515,400.099),(69.515,385.099),(69.515,370.099),(69.515,355.099),(69.515,340.099),(69.515,3 25.099),(69.515,310.099),(69.515,295.099),(69.515,280.099),(61.778,266.298),(69.515,253.571),(69.515,238.571),(69.515,223.57 1),(69.515,208.571),(69.515,193.571),(69.515,178.571),(69.515,163.571),(69.515,148.571),(69.515,133.571),(69.515,118.571),(6 9.515,103.571),(56.481,95.317),(50.000,81.317),(52.139,66.039),(62.216,54.357),(77.015,50.000),(91.814,54.357),(101.891,66.0 39),(104.030,81.317),(97.549,95.317),(84.515,103.571),(84.515,118.571),(84.515,133.571),(84.515,148.571),(84.515,163.571),(8 4.515,178.571),(84.515,193.571),(84.515,208.571),(84.515,223.571),(84.515,238.571),(84.515,253.571),(92.252,266.298),(84.515 ,280.099),(84.515,295.099),(84.515,310.099),(84.515,325.099),(84.515,340.099),(84.515,355.099),(84.515,370.099),(84.515,385. 099),(84.515,400.099),(91.339,412.302),(84.515,424.506),(84.515,439.506),(84.515,454.506),(84.515,469.506),(92.252,483.306), (84.515,496.033),(84.515,511.033),(84.515,526.033)] out = [] out.append('<svg xmlns="http://www.w3.org/2000/svg" version="1.1">n') ## [1] phosphate backbone - <polyline> tag points = ' '.join(['%.3f,%.3f'%(x, y) for x, y in coor]) out.append('<polyline points="%s" style="fill:none; stroke:black; stroke-width:1;"/>n'%(points)) ## [2] base-pairing - <line> tag for i, j in pairs: x1, y1 = coor[i] x2, y2 = coor[j] out.append('<line x1="%.3f" y1="%.3f" x2="%.3f" y2="%.3f" style="stroke:black; stroke-width:1;"/>n'%(x1, y1, x2, y2)) ## [3] nucleotide - <circle> and <text> tags for i, base in enumerate(seq): x, y = coor[i] out.append('<circle cx="%.3f" cy="%.3f" r="%.3f" style="fill:white; stroke:black; stroke-width:1"/>n'%(x, y, 5)) out.append('<text x="%.3f" y="%.3f" font-size="6" text-anchor="middle" style="fill:black">%s</text>n'%(x, y+6*0.35, base)) out.append('</svg>n') open('rna.svg', 'w').write(''.join(out))
  • 15. How to use other SVG tags? Go to w3schools.com!
  • 17. 17 reciPlot <text> <polygon> Plot for visualizing the tissue-specific expression of genes.
  • 18. 18 escPlot <line> <text> <path> <circle> <polyline> Plot for representing expression, structure, and conservation data of RNA collectively in a single plot.
  • 19. wheelPlot 19 <circle> <polyline> <path> <line> <rect> <text> Plot for visualizing all suboptimal RNA secondary structures.
  • 20. Conclusions 20 • There are many graphic tools and libraries for data visualization. • These software options provide a function limited to high level graphics. • No dependent libraries or significant time investment are required for learning a specific language to write SVG documents. • If you want to plot a noncanonical type of graph and customize it at low level, writing a SVG document with Python will be the best solution that meets your purpose.
  • 21. Thank you! Have a nice weekend. 21

Editor's Notes

  • #2: 안녕하세요. 서울대학교 생물정보학 연구실 박사과정에 재학중인 김석준입니다. 제가 오늘 말씀드릴 내용은 Python과 SVG를 이용한 데이터 시각화 입니다. 여러분의 실제적인 이해를 돕기 위해 생물학적인 예제를 중심으로 구성해 왔습니다. 바로 RNA의 2차 구조를 그려보는 예제인데요. 너무 생물학적인 예제라 생각이 드시겠지만, 이 예제를 이해하고 나시면 생물학적인 주제 뿐만이 아니라 여러분이 생각하시는 모든 데이터 시각화에 있어 도움이 되실 거라 저는 생각합니다.
  • #3: 우리는 보통 데이터 시각화를 하기 위해 시각화 소프트웨어 또는 라이브러리들을 사용하게 됩니다. 여기 데이터 시각화를 하기 위한 수 많은 소프트웨어와 라이브러리들이 나열되어 있습니다. 그런데, 이러한 시각화 도구들을 사용하기 위해서는 시각화 도구가 갖고 있는 언어나 복잡한 사용법을 익혀야 합니다. 또한 컴퓨터에 설치하는 과정을 거쳐야 하며 설치하는 도중에 의존성 문제가 발견되기도 합니다. 그리고 높은 레벨의 그래픽만 다룰 수 있으며 낮은 레벨의 그래픽을 다루기에는 한계가 있습니다.
  翻译: