Permalink
Browse files

Minor updates

  • Loading branch information...
chofski committed Apr 12, 2017
1 parent c6fd279 commit 0d1a5834b22e6ef4fa6b443d264cd4e51bd69e4a
@@ -1,22 +1,6 @@
DNAplotlib
==========
#DNAplotlib

DNAplotlib is a library that enables highly customizable visualization of individual genetic constructs and libraries of design variants. It can be thought of in many ways as matplotlib for genetic diagrams. Publication quality vector-based output is produced and all aspects of the rendering process can be easily customized or replaced by the user. DNAplotlib is capable of SBOL Visual compliant diagrams in addition to a format able to better illustrate the precise location and length of each genetic part. This alternative "traced-based" visualization method enables direct comparison with nucleotide-level information such as RNA-seq read depth or other base resolution measures. While it is envisaged that access will be predominantly via the programming interface, several easy to use text-based input formats can be processed by a command-line scripts to facilitate broader usage. DNAplotlib is cross-platform and open-source software released under the OSI OSL-3.0 license.

DEPENDENCIES
============
#Dependences
NumPy, matplotlib, pySBOL (optional)

INSTALLATION
============

1. DNAPlotLib can be easily installed using setuptools, available here https://pypi.python.org/pypi/setuptools#downloads. (Setuptools is a stable and well-supported library that makes distributing Python projects easier):

2. Run the installer script in the project root directory using the following command line:
$ python setup.py install

3. To use DNAPlotLib:
>>> import dnaplotlib
4. To use pySBOL (if available on system):
>>> import dnaplotlib.sbol
File renamed without changes.
@@ -1,4 +1,4 @@
#DNAplotlib
# DNAplotlib

DNAplotlib is a library that enables highly customizable visualization of individual genetic constructs and libraries of design variants. It can be thought of in many ways as matplotlib for genetic diagrams. Publication quality vector-based output is produced and all aspects of the rendering process can be easily customized or replaced by the user. DNAplotlib is capable of SBOL Visual compliant diagrams in addition to a format able to better illustrate the precise location and length of each genetic part. This alternative "traced-based" visualization method enables direct comparison with nucleotide-level information such as RNA-seq read depth or other base resolution measures. While it is envisaged that access will be predominantly via the programming interface, several easy to use text-based input formats can be processed by a command-line scripts to facilitate broader usage. DNAplotlib is cross-platform and open-source software released under the OSI OSL-3.0 license.

@@ -2325,13 +2325,13 @@ def renderDNA (self, ax, parts, part_renderers, regs=None, reg_renderers=None, p
prev_end, self.scale,
self.linewidth, opts=part_opts)

#update start,end for regulation
#if part['fwd'] == True:
# part['start'] = prev_start
# part['end'] = prev_end
#else:
# part['start'] = prev_end
# part['end'] = prev_start
#update start,end for regulation [TEG]
if part['fwd'] == True:
part['start'] = prev_start
part['end'] = prev_end
else:
part['start'] = prev_end
part['end'] = prev_start

if first_part == True:
first_start = prev_start
Binary file not shown.
Binary file not shown.
@@ -86,6 +86,12 @@ def lighten_color (col, fac):
# How much to lighten OFF components
off_fac = 0.7

print('black', lighten_color(col_map['black'],off_fac))
print('red', lighten_color(col_map['red'],off_fac))
print('green', lighten_color(col_map['green'],off_fac))
print('blue', lighten_color(col_map['blue'],off_fac))
print('orange', lighten_color(col_map['orange'],off_fac))

pA_OFF = {'type':'Promoter', 'name':'pA', 'fwd':True, 'opts':{'linewidth':lw, 'color':lighten_color(col_map['black'],off_fac)}}
pB_OFF = {'type':'Promoter', 'name':'pB', 'fwd':True, 'opts':{'linewidth':lw, 'color':lighten_color(col_map['black'],off_fac)}}
p1_OFF = {'type':'Promoter', 'name':'p3', 'fwd':True, 'opts':{'linewidth':lw, 'color':lighten_color(col_map['red'],off_fac)}}
@@ -0,0 +1,2 @@
[metadata]
description-file = DESCRIPTION.md
@@ -1,72 +1,15 @@
__author__ = 'Thomas E. Gorochowski'

"""A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""

# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
# Determine if Windows or Mac
import platform

here = path.abspath(path.dirname(__file__))

# Get the long description from the relevant file
with open(path.join(here, 'DESCRIPTION.rst'), encoding='utf-8') as f:
long_description = f.read()

print((platform.system()))

from distutils.core import setup
setup(
name='dnaplotlib',

# Versions should comply with PEP440. For a discussion on single-sourcing
# the version across setup.py and the project code, see
# https://packaging.python.org/en/latest/single_source_version.html
version='1.0.0b1',

description='Visualization library for genetic constructs',
long_description=long_description,

# The project's main homepage.
url='https://github.com/VoigtLab/dnaplotlib',

# Author details
author='Thomas E. Gorochowski, Bryan Der, Emerson Glassey',
author_email='tom@chofski.co.uk, bder@mit.edu, eglassey@mit.edu',

# Choose your license
license='OSI Open Software License 3.0 (OSL-3.0)',

# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=[
# How mature is this project? Common values are
# 3 - Alpha
# 4 - Beta
# 5 - Production/Stable
'Development Status :: 4 - Beta',

# Indicate who your project is intended for
'Intended Audience :: Developers',

# Pick your license as you wish (should match "license" above)
'License :: OSL-3.0',

# Specify the Python versions you support here. In particular, ensure
# that you indicate whether you support Python 2, Python 3 or both.
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7'
],

keywords='synthetic biology, visualization',

packages=find_packages(), # Should find packages dnaplotlib and sbol

zip_safe = True # Prevents .egg from installing as a .zip. It must be unpacked to import the _libsbol binaries properly
name = 'dnaplotlib',
packages = ['dnaplotlib'],
version = '1.0',
description = 'A random test lib',
author = 'Thomas Gorochowski, ',
author_email = 'tom@chofski.co.uk',
url = 'https://github.com/VoigtLab/dnaplotlib',
download_url = 'https://github.com/VoigtLab/dnaplotlib/archive/1.0.tar.gz',
keywords = ['visualization', 'SBOLv', 'genetic design', 'synthetic biology', 'systems biology'],
classifiers = [],
)

# http://peterdowns.com/posts/first-time-with-pypi.html

0 comments on commit 0d1a583

Please sign in to comment.