skip to navigation
skip to content

Not Logged In

pydna 0.1.3

Contains classes and code for representing double stranded DNA and functions for simulating homologous recombination between DNA molecules.

Latest Version: 0.6.0

Pydna provide classes and functions for molecular biology using python. Notably, PCR, cut and paste cloning and homologous recombination between linear DNA fragments are supported. Most functionality is implemented as methods for the double stranded DNA sequence record classes Dseq and Dseqrecord, which are subclasses of the Biopython. Seq and SeqRecord classes.

Pydna might be useful to automate the simulation of sub cloning experiments using python. This could be helpful to generate examples for teaching purposes. Read the documentation or the cookbook with example files for further information.

Pydna was designed to semantically imitate how sub cloning experiments are typically documented in Scientific literature. Pydna code describing a sub cloning is reasonably compact and meant to be easily readable.

One use case for Pydna is to create a sort of executable documentation describing a subcloning experiment. The Pydna code unambiguously describe a sub cloning experiment, and can be executed to yield the sequence of the of the resulting DNA molecule.

Please post a message in the google group "pydna" at!forum/pydna if you have problems, questions or comments.

Feedback is very welcome!

Typical usage at the command line could look like this:

>>> import pydna
>>> seq = pydna.Dseq("GGATCCAAA","TTTGGATCC",ovhg=0)
>>> seq
>>> from Bio.Restriction import BamHI
>>> a,b = seq.cut(BamHI)
>>> a
>>> b
>>> a+b
>>> b+a
>>> b+a+b
>>> b+a+a
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/pydna/", line 217, in __add__
    raise TypeError("sticky ends not compatible!")
TypeError: sticky ends not compatible!


version date comment
0.1.3 2013-04-09 pydna created from Python-dna.

System Requirements

Python 2.x

Versions other than 2.7 has not been tried with this software. Version 2.7.3 was used to build the distribution.

Python 3.x

This code has not been tried with python 3.



You need to install the dependencies listed above. If you are using Windows, you need to have a C compiler installed. The free MS visual studio 2008 express can be used.

Open the pydna source code directory (containing the file) in terminal and type:

sudo python install <enter>

If you need to do additional configuration, e.g. changing the base directory, please type python, or see the documentation for Setuptools.

Binary distribution

A Binary installer for 32 bit editions of MS Windows XP and 7 are provided.

The installer has been tested on succesfully on both.

The dependencies have to be installed from source or using binary installers for 32 bit windows.

This is a list of locations of binary installers:

Source Code Repository

pydna is hosted by google code:

Distribution Structure

README.txt -- This file.

NEWS.txt -- Release notes and news

LICENSE.txt -- What you can do with the code. -- Tells distutils what files to distribute -- Installation file. -- Building from Cython source (not needed for install) -- Bootstrap distribute installation for version 0.6.34 which will pretend to be setuptools 0.6c11 -- run tests by "python"<enter>

pydna/ -- The actual code.

docs/ -- Documentation.

scripts/ -- Miscellaneous perhaps useful scripts

tests/ -- Testing code

File Type Py Version Uploaded on Size
pydna-0.1.3.tar.gz (md5) Source 2013-04-09 2MB (md5) MS Windows installer 2.7 2013-04-09 303KB
pydna-0.1.3.win32-py2.7.exe (md5) MS Windows installer 2.7 2013-04-09 275KB (md5) Source 2013-04-09 2MB
  • Downloads (All Versions):
  • 92 downloads in the last day
  • 1728 downloads in the last week
  • 3085 downloads in the last month