pydna

HomePage: http://pypi.python.org/pypi/pydna/

Author: Björn Johansson

Download: https://pypi.python.org/packages/source/p/pydna/pydna-0.6.1.tar.gz

        =====
pydna
=====

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.

Most functionality is implemented as methods for the double stranded 
DNA sequence record classes Dseq and Dseqrecord, which are subclasses 
of the `Biopython <http://biopython.org/wiki/Main_Page>`_
`Seq <http://biopython.org/wiki/Seq>`_
and
`SeqRecord <http://biopython.org/wiki/SeqRecord>`_ classes.

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("myself@email.com") # 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 <http://en.wikipedia.org/wiki/Subcloning>`_ experiments using
python. This could be helpful to generate examples for teaching purposes. Read
the `documentation <https://pydna.readthedocs.org/en/latest/>`_ or the
`cookbook <https://www.dropbox.com/sh/u1kr30hd22zuwse/gyXYhq0BlL>`_ with example files
for further information.

An `on-line <http://pydna-shell.appspot.com/>`_ shell running Python with
pydna is avaiable for experimentation.

Please post a message in the `google group <https://groups.google.com/d/forum/pydna>`_
for pydna if you have problems, questions or comments.

Feedback in the form of questions, comments or critisism is very welcome!


=======   ========== =============================================================
version   date       comment
=======   ========== =============================================================
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