Name: dnaplotlib
Owner: Synthetic Biology Data Exchange Group
Description: null
Created: 2015-07-28 05:29:33.0
Updated: 2017-01-09 11:07:50.0
Pushed: 2017-04-12 20:02:22.0
Homepage: null
Size: 31938
Language: HTML
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
DNAplotlib is a library enabling highly customizable visualization of genetic constructs, including visualization of multiple variants in a library at once. This version is forked from the original DNAplotlib, which can be found here at the Voigt lab GitHub repo.. DNAplotlib can be thought of as matplotlib for genetic diagrams. It supports easy and novel ways of visualizing genetic diagrams and experimental data for synthetic biology.
This DNAplotlib package is a standard Python distribution package that can easily be installed with setuptools (see below). The purpose of this package is to provide the user with full support for the Synthetic Biology Open Language. In addition to visualizing genetic diagrams with the SBOL Visual standard symbol set, this package also allows you to read and write genetic designs in the standard SBOL file format (version 1.1 at this time only). For this reason, DNAplotlib comes bundled with pySBOL
DNAplotlib was developed by Thomas E. Gorochowski, Bryan Der, and Emerson Glassey in the lab of Chris Voigt at MIT. pySBOL was developed by Bryan Bartley and Jeff Johnson in the lab of Herbert Sauro at UW.
NumPy, MatplotLib, pySBOL (included)
Tested on Mac OSX Version 10.9.5 and Windows 7 Enterprise with Python 2.7.9 32 bit. Python 3 not currently supported.
Package installation requires setuptools, available here https://pypi.python.org/pypi/setuptools#downloads. (Setuptools is a stable and well-supported library that makes distributing Python projects easier)
1 - Git the package.
2 - After setuptools is installed, run the DNAPlotLib installer script using the following command line in the package's root directory :
thon setup.py install
3 - Test import of the modules in your python environment. (Caution! If you are inside the package folder when you attempt import, the Python interpreter will try to load the module locally rather than from your system installation and will consequently fail. Navigate outside the package folder and re-attempt import.)
import dnaplotlib
import dnaplotlib.sbol as sbol
This example script reads a genetic design from an SBOL file and renders it as a diagram using SBOL Visual symbols. The example SBOL file is included in this package.
rt dnaplotlib as dpl
rt dnaplotlib.sbol as sbol
rt matplotlib.pyplot as plt
port the SBOL design file
= sbol.Document()
read('gene_cassette.sbol')
this case, we know ahead of time the URI of the design. In some cases, you may have to explore the doc's components to find the design you are looking for
gn = doc.components['http://sbolstandard.org/examples/Design']
t design.display_id
eate the DNAplotlib renderer
dpl.DNARenderer()
stantiate rendered
_renderers = dr.SBOL_part_renderers()
eate the figure
= plt.figure()
plt.gca()
nder SBOL. This function has parallel structure to renderDNA
t, end = dr.renderSBOL(ax, design, part_renderers)
ve the figure a title
write_label(ax, design.display_id, (start+end)/2, { 'label_size' : 18, 'label_y_offset': 12 })
nfigure plot
et_xlim([start, end])
et_ylim([-18,18])
et_aspect('equal')
et_xticks([])
et_yticks([])
xis('off')
show()