This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

A Python library for pretty-printing DNA and protein sequences using a monospace font

Project Description

monoseq is a Python library for pretty-printing sequence strings using a monospace font. It also provides a simple command line interface.

Sequences are pretty-printed in the for DNA and proteins traditional way using blocks of letters where each line is prefixed with the sequence position. User-specified regions are highlighted using different formatting styles. The output format can be HTML or plaintext with optional styling using ANSI escape codes for use in a terminal.

>>> import monoseq
>>> sequence = 'MIMANQPLWLDSEVEMNHYQQSHIKSKSPYFPEDKHICWIKIFKAFGT' * 4
>>> print monoseq.pprint_sequence(sequence, mode='plaintext')
  1  MIMANQPLWL DSEVEMNHYQ QSHIKSKSPY FPEDKHICWI KIFKAFGTMI MANQPLWLDS
 61  EVEMNHYQQS HIKSKSPYFP EDKHICWIKI FKAFGTMIMA NQPLWLDSEV EMNHYQQSHI
121  KSKSPYFPED KHICWIKIFK AFGTMIMANQ PLWLDSEVEM NHYQQSHIKS KSPYFPEDKH
181  ICWIKIFKAF GT

This screenshot shows the use of ANSI escape codes:

Here is an example of monoseq used to output HTML, and this IPython Notebook shows how to pretty-print sequences in an IPython Notebook.

To install the latest release via PyPI using pip:

pip install monoseq

Documentation

The latest documentation with user guide and API reference is hosted at Read The Docs.

You can also compile the documentation directly from the source code by running make html from the doc/ subdirectory. This requires Sphinx to be installed.

Release History

Release History

This version
History Node

1.2.1

History Node

1.2.0

History Node

1.1.1

History Node

1.1.0

History Node

1.0.0

History Node

0.1.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
monoseq-1.2.1.tar.gz (8.3 kB) Copy SHA256 Checksum SHA256 Source May 10, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting