Contains classes and code for representing double stranded DNA and functions for simulating homologous recombination between DNA molecules.
Pydna provide functions for molecular biology using python. Double stranded DNA sequence classes that make cut and paste cloning and PCR very simple is provided (see example below).
>>> import pydna >>> seq = pydna.Dseq("GGATCCAAA","TTTGGATCC",ovhg=0) >>> seq Dseq(-9) GGATCCAAA CCTAGGTTT >>> from Bio.Restriction import BamHI >>> a,b = seq.cut(BamHI) >>> a Dseq(-5) G CCTAG >>> b Dseq(-8) GATCCAAA GTTT >>> a+b Dseq(-9) GGATCCAAA CCTAGGTTT >>> b+a Dseq(-13) GATCCAAAG GTTTCCTAG >>> b+a+b Dseq(-17) GATCCAAAGGATCCAAA GTTTCCTAGGTTT >>> b+a+a Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.7/dist-packages/pydna/dsdna.py", line 217, in __add__ raise TypeError("sticky ends not compatible!") TypeError: sticky ends not compatible! >>>
Notably, homologous recombination and Gibson assembly between linear DNA fragments can be easily simulated.
Pydna was designed to provide a form of executable documentation describing a subcloning or DNA assembly 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.
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.
The nine lines of Python below, simulates the construction of a recombinant plasmid. DNA sequences are downloaded from Genbank by accession numbers that are guaranteed to be stable.
import pydna gb = pydna.Genbank("firstname.lastname@example.org") # Tell Genbank who you are! gene = gb.nucleotide("X06997") # Kluyveromyces lactis LAC12 gene for lactose permease. primer_f,primer_r = pydna.parse(''' >760_KlLAC12_rv (20-mer) ttaaacagattctgcctctg >759_KlLAC12_fw (19-mer) aaatggcagatcattcgag ''', ds=False) pcr_prod = pydna.pcr(primer_f,primer_r, gene) vector = gb.nucleotide("AJ001614") # pCAPs cloning vector from Bio.Restriction import EcoRV lin_vector = vector.linearize(EcoRV) rec_vec = ( lin_vector + pcr_prod ).looped()
Pydna might also 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.
An on-line shell running Python with pydna is avaiable for experimentation.
Please post a message in the google group for pydna if you have problems, questions or comments.
Feedback in the form of questions, comments or critisism is very welcome!
|0.6.1||2014-04-25||Fixed a bug in the Dseqrecord synced method and removed the utils synced function.|
|0.6.0||2014-04-18||Bugfixes and improvements in documentation.|
|0.5.0||2013-12-16||Changes to how the amplify and assembly modules work the Amplicon and Assembly classes are now subclasses of Dseqrecord.|
|0.2.2||2013-11-05||bugfix: changed the handling of compound features to fit with the new version of BioPython (1.62) which is now a requirement.|
|0.1.8||2013-06-02||bugfix: changed the SeqFeatures added to PCR products in the amplify module to a dict of list of strings instead of a dict of strings.|
|0.1.7||2013-05-29||Changed the code in amplify.Amplicon to handle features spanning the origin of circular sequences.|
|0.1.6||2013-04-22||Changed the behaviour of the find method of the Dseq object to find substrings that span the origin. Slicing for circular Dseq objects now works slightly different.|
|0.1.5||2013-04-18||Changed the setup.py script to permit installation of the source installer without access to a c compiler.|
Cleaned up some docstrings Renamed Drecord -> Dseqrecord to be more consistent with Dseq and Biopython Seq/SeqRecord.
Changed name of keyword argument for read and parse. ds=True returns Dseqrecord(s) while ds=False returns SeqRecords.
|0.1.3||2013-04-09||pydna created from Python-dna.|
This package was developed on and for Python 2.7. Other versions have not been tested.
This code has not been tried with Python 3. If there is sufficient interest, there might be a Python 3 version in the future.
The best way of installing pydna is with pip. Pip is the officially recommended tool for installaion of Python packages from PyPi. Pip installs dependencies automatically.
bjorn@bjorn-UL30A:~/Dropbox/pydna$ sudo pip install pydna
C:\> pip install pydna
If you do not have pip, you can get it by following these instructions.
If you install from source, you need to install the dependencies (listed above). Download one of the source installers from the pypi site and extract the file. Open the pydna source code directory (containing the setup.py file) in terminal and type:
python setup.py install
Binary installers for 32 and 64 bit editions of MS Windows are provided.
The dependencies have to be installed separately. This can be done using the binary installers for Windows for those who are not comfortable at the command line:
Source Code Repository
Pydna is hosted by google code: http://code.google.com/p/pydna/
README.txt – This file.
LICENSE.txt – What you can do with the code.
setup.py – Installation file.
run_tests.py – run tests by “python run_tests.py”<enter>
pydna/ – The code.
docs/ – Documentation and cookbook.
scripts/ – Miscellaneous and perhaps useful scripts and examples.
tests/ – Testing code.
Release history Release notifications
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size & hash SHA256 hash help||File type||Python version||Upload date|
|pydna-0.6.1-py2.7.egg (435.1 kB) Copy SHA256 hash SHA256||Egg||2.7||Apr 26, 2014|
|pydna-0.6.1-py2-none-any.whl (203.1 kB) Copy SHA256 hash SHA256||Wheel||2.7||Apr 26, 2014|
|pydna-0.6.1.tar.gz (2.3 MB) Copy SHA256 hash SHA256||Source||None||Apr 26, 2014|
|pydna-0.6.1.win32.exe (307.2 kB) Copy SHA256 hash SHA256||Windows Installer||2.7||Apr 26, 2014|
|pydna-0.6.1.win-amd64.exe (334.9 kB) Copy SHA256 hash SHA256||Windows Installer||2.7||Apr 26, 2014|
|pydna-0.6.1.zip (2.4 MB) Copy SHA256 hash SHA256||Source||None||Apr 26, 2014|