Skip to main content

Generate human-friendly icons from DNA sequences

Project description

.. raw:: html

<p align="center">
<img alt="lala Logo" title="sequenticon Logo" src="" width="550">
<br /><br />

.. image::
:alt: Travis CI build status

.. image::

Sequenticon is a Python library to generate `identicons <>`_ for DNA sequences. For instance the sequence ``ATGGTGCA`` gets converted to the following icon:

.. raw:: html

<br />
<p align="center">
<img title="sequenticon example" src="" width="80"/>
<br /><br />

When are sequenticons useful ?

In biological engineering, DNA sequence files often get updated or re-named. This can cause critical confusions when the wrong files or wrong sequence versions get used in a process. Ideally, laboratory information systems would prevent such mistakes, but when they happen they are difficult to trace back to the faulty sequences.

Therefore, when using software to process large batches of sequences, one may want a way to quickly decide whether the sequence ```` used on March 15th is the same as ```` which appears in the April 18th batch.

Identicons provide a simple visual way to know that two sequences are different (different identicons) or very probably the same (same identicon).

Also note that, theoretically, even two large sequences differing by one nucleotide only will have very different sequenticon looks.


.. code:: python

from sequenticon import sequenticon

# Write a sequence to a PNG sequenticon file
sequenticon("ATGGTGCA", size=120, output_path="icon.png")

# Get a self-contained "<img/>" HTML string, to embed in a webpage
img_tag = sequenticon("ATGGTGCA", size=60, output_format="html_image")

To process a batch:

.. code:: python

from sequenticon import sequenticon_batch

sequences = [("seq1", "ATTGTG"), ("seq2", "TAAATGCC"), ...] # OR
sequences = ["", "record2.fa", ...] # OR
sequences = [biopython_record_1, biopython_record_2, ...]

# Write a batch of sequences as PNG in a folder
sequenticon_batch(sequences, size=120, output_path="my_emoticons/")

# Get a list [(sequence_name, html_image_tag), (...)]
data = sequenticon_batch(sequences, size=60, output_format="html_image")

# Write a PDF report with every sequenticon
sequenticon_batch_pdf(sequences, "my_report.pdf")

Here is an example PDF output from the last command (`full PDF <">`_):

.. raw:: html

<p align="center">
<img alt="sequenticon Logo" title="sequenticon Logo" src="" width="381">
<br /><br />


You can install Sequenticon through PIP

.. code::

sudo pip install sequenticon

Alternatively, you can unzip the sources in a folder and type

.. code::

sudo python install

License = MIT

This project is an open-source software originally written at the `Edinburgh Genome Foundry <>`_ by `Zulko <>`_ and `released on Github <>`_ under the MIT licence (¢ Edinburg Genome Foundry).

Everyone is welcome to contribute !

More biology software

.. image::

Sequenticon is part of the `EGF Codons <>`_ synthetic biology software suite for DNA design, manufacturing and validation.

**Note: also check out Pydenticon.** Sequenticon is really just a few lines of Python around the more generic [pydenticon]( library. The upside of having an official *sequenticon* library is to make sure that the icons, colors, etc. remain consistent accross projects.

Project details

Download files

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

Source Distribution

sequenticon-0.1.1.tar.gz (8.9 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page