All Projects → BjornFJohansson → pydna

BjornFJohansson / pydna

Licence: other
Clone with Python! Data structures for double stranded DNA & simulation of homologous recombination, Gibson assembly, cut & paste cloning.

Programming Languages

Jupyter Notebook
11667 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to pydna

poly
A Go package for engineering organisms.
Stars: ✭ 270 (+147.71%)
Mutual labels:  dna, genbank, fasta
Dna 3d Engine
3d engine implementation in DNA code!
Stars: ✭ 493 (+352.29%)
Mutual labels:  biology, dna
Bio.jl
[DEPRECATED] Bioinformatics and Computational Biology Infrastructure for Julia
Stars: ✭ 257 (+135.78%)
Mutual labels:  biology, dna
jupyter-cache
A defined interface for working with a cache of executed jupyter notebooks
Stars: ✭ 28 (-74.31%)
Mutual labels:  jupyter, jupyter-notebooks
polio
Research on polio / protein folding.
Stars: ✭ 13 (-88.07%)
Mutual labels:  biology, genbank
Repo-Bio
Binomica Public Repository for Biological Parts
Stars: ✭ 21 (-80.73%)
Mutual labels:  biology, dna
Self-Driving-Car-Steering-Simulator
The aim of this project is to allow a self driving car to steer autonomously in a virtual environment.
Stars: ✭ 15 (-86.24%)
Mutual labels:  jupyter, jupyter-notebooks
FluentDNA
FluentDNA allows you to browse sequence data of any size using a zooming visualization similar to Google Maps. You can use FluentDNA as a standalone program or as a python module for your own bioinformatics projects.
Stars: ✭ 52 (-52.29%)
Mutual labels:  dna, fasta
Vds
Verteego Data Suite
Stars: ✭ 9 (-91.74%)
Mutual labels:  jupyter, anaconda
Crime Analysis
Association Rule Mining from Spatial Data for Crime Analysis
Stars: ✭ 20 (-81.65%)
Mutual labels:  jupyter, anaconda
Ml Workspace
🛠 All-in-one web-based IDE specialized for machine learning and data science.
Stars: ✭ 2,337 (+2044.04%)
Mutual labels:  jupyter, anaconda
Biopython
Official git repository for Biopython (originally converted from CVS)
Stars: ✭ 2,936 (+2593.58%)
Mutual labels:  dna, biopython
naf
Nucleotide Archival Format - Compressed file format for DNA/RNA/protein sequences
Stars: ✭ 35 (-67.89%)
Mutual labels:  dna, fasta
BuddySuite
Bioinformatics toolkits for manipulating sequence, alignment, and phylogenetic tree files
Stars: ✭ 106 (-2.75%)
Mutual labels:  biology, dna
Fastpages
An easy to use blogging platform, with enhanced support for Jupyter Notebooks.
Stars: ✭ 2,888 (+2549.54%)
Mutual labels:  jupyter, jupyter-notebooks
colour-notebooks
Colour - Jupyter Notebooks
Stars: ✭ 21 (-80.73%)
Mutual labels:  jupyter, jupyter-notebooks
perf
PERF is an Exhaustive Repeat Finder
Stars: ✭ 26 (-76.15%)
Mutual labels:  biopython, fasta
heroku-jupyterlab
An example of running JupyterLab on Heroku, with Amazon S3.
Stars: ✭ 54 (-50.46%)
Mutual labels:  jupyter, jupyter-notebooks
Py
Repository to store sample python programs for python learning
Stars: ✭ 4,154 (+3711.01%)
Mutual labels:  jupyter, jupyter-notebooks
Nbdev
Create delightful python projects using Jupyter Notebooks
Stars: ✭ 3,061 (+2708.26%)
Mutual labels:  jupyter, jupyter-notebooks

icon pydna

Tests & Coverage codecov PyPI version Anaconda-Server Badge Google group : pydna
Documentation Status GitHub issues Anaconda-Server Badge2 GitHub stars

Planning genetic constructs with many parts and assembly steps, such as recombinant metabolic pathways 🧫, are often difficult to properly document as is evident from the state of such documentation in the scientific literature ☢️.

The pydna python package provide a human-readable formal descriptions of 🧬 cloning and genetic assembly strategies in Python 🐍 which allow for simulation and verification.

Pydna can perhaps be thought of as executable documentation for cloning.

A cloning strategy expressed in pydna is complete, unambiguous and stable.

Pydna provides simulation of:

  • Restriction digestion
  • Ligation
  • PCR
  • Primer design
  • Gibson assembly
  • Golden gate assembly
  • Homologous recombination
  • Gel electrophoresis of DNA with generation of gel images

Virtually any sub-cloning experiment can be described in pydna, and its execution yield the sequences of intermediate and final DNA molecules.

Pydna has been designed to be understandable for biologists with only some basic understanding of Python.

Pydna can formalize planning and sharing of cloning strategies and is especially useful for complex or combinatorial DNA molecule constructions.

To get started, we have compiled some simple examples. For more elaborate use, look at some assembly strategies of D-xylose metabolic pathways MetabolicEngineeringGroupCBMA/ypk-xylose-pathways.

There is an open access paper in BMC Bioinformatics describing pydna:

abstr

Please reference the above paper:

Pereira, F., Azevedo, F., Carvalho, Â., Ribeiro, G. F., Budde, M. W., & Johansson, B. (2015). Pydna: a simulation and documentation tool for DNA assembly strategies using python. BMC Bioinformatics, 16(142), 142.

if using pydna in a scientific publication.

-----------------------------------------------------

Usage

Most pydna 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.

These classes make cut and paste cloning and PCR very simple:

>>> from pydna.dseq import Dseq
>>> seq = 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!
>>>

As the example above shows, pydna keeps track of sticky ends.

Notably, homologous recombination and Gibson assembly between linear DNA fragments can be easily simulated without any additional information besides the primary sequence of the fragments.

Gel electrophoresis of DNA fragments can be simulated using the included gel module

Jupyter QtConsole 4.7.7
Python 3.8.5 | packaged by conda-forge | (default, Aug 29 2020, 01:22:49)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.18.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: from pydna.gel import gel

In [2]: from pydna.ladders import PennStateLadder

In [3]: from pydna.dseqrecord import Dseqrecord

In [4]: gel([PennStateLadder,[Dseqrecord("A"*2000)]])
Out[4]:

Pydna can be very compact. The eleven 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 over time.

from pydna.genbank import Genbank
gb = Genbank("[email protected]") # Tell Genbank who you are!
gene = gb.nucleotide("X06997") # Kluyveromyces lactis LAC12 gene for lactose permease.
from pydna.parsers import parse_primers
primer_f,primer_r = parse_primers(''' >760_KlLAC12_rv (20-mer)
                                      ttaaacagattctgcctctg

                                      >759_KlLAC12_fw (19-mer)
                                      aaatggcagatcattcgag ''')
from pydna.amplify import pcr
pcr_prod = 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 can automate the simulation of sub cloning experiments using python. This is helpful to generate examples for teaching purposes.

Read the documentation (below) or the cookbook with example files for further information.

Please post a message in the google group for pydna if you need help or have problems, questions or comments 🆘.

Feedback & suggestions are very welcome!

-----------------------------------------------------

Who is using pydna?

An Automated Protein Synthesis Pipeline with Transcriptic and Snakemake

Pyviko: an automated Python tool to design gene knockouts in complex viruses with overlapping genes

and others

-----------------------------------------------------

Documentation

Documentation is built using Sphinx from docstrings in the code and displayed at readthedocs Documentation Status

The numpy docstring format is used.

-----------------------------------------------------

Installation using conda

The absolutely best way of installing and using pydna is to use the free Anaconda or Miniconda python distributions.

Anaconda is a large download (about 600-700 Mb) while Miniconda is about 70-80 Mb.

Once Anaconda (or Miniconda) is installed, the conda package manager can be used to install pydna.

Type the command below followed by return:

conda install -c conda-forge -c defaults -c BjornFJohansson pydna

The command above pulls packages from the software channels conda-forge and defaults. The pydna package itself is present in the BjornFJohansson channel.

This works on Windows, MacOSX and Linux, and installs all necessary and optional dependencies automatically (see below).

The conda install command will install the latest version, even if this is an alpha version.

Older versions of pydna are available from the BjornFJohansson package channel.

-----------------------------------------------------

Installation using pip

The second best way of installing pydna is with pip, the officially recommended tool.

Pip is included in recent Python versions.

Pip installs the minimal installation requirements automatically, but not the optional requirements (see below).

sudo pip install pydna --pre

Use the --pre switch to get the latest version of pydna.

Windows:

You should be able to pip install pydna from the Windows terminal as biopython now can be installed with pip as well.

C:\> pip install pydna --pre

By default python and pip are not on the PATH. You can re-install Python and select this option during installation, or give the full path for pip. Try something like this, depending on where your copy of Python is installed:

C:\Python37\Scripts\pip install pydna --pre

Installing requirements

If you want to install requirements before installing pydna, you can do:

pip install -r requirements.txt

And for the optional requirements:

pip install -r requirements_optional.txt

For testing:

pip install -r requirements_test.txt

or

conda install --file requirements.txt

-----------------------------------------------------

Installation from Source

If you install from source, you need to install all dependencies separately (listed above). Download one of the source installers from the pypi site or from Github and extract the file. Open the pydna source code directory (containing the setup.py file) in terminal and type:

python setup.py install

-----------------------------------------------------

Source Code

Pydna is developed on Github :octocat:.

-----------------------------------------------------

Minimal installation dependencies

Pydna is currently developed on and for Python 3.7 - 3.10. Pydna versions before 1.0.0 were compatible with python 2.7 only. The list below is the minimal requirements for installing pydna. Biopython has c-extensions, but the other modules are pure python.

-----------------------------------------------------

Optional dependencies

If the modules listed below in the first column are installed, they will provide the functionality listed in the second column.

Dependency Function in pydna
pyparsing fix corrupt Genbank files with pydna.genbankfixer
requests download sequences with pydna.download
CAI Codon Adaptation Index calculations in several modules
numpy gel simulation with pydna.gel
scipy
matplotlib
pillow

-----------------------------------------------------

Requirements for running tests and analyzing code coverage

-----------------------------------------------------

Changelog

See the change log for recent changes.

-----------------------------------------------------

Automatic testing & Release process

There are three github actions associated with this package:

  • pydna_test_and_coverage_workflow.yml
  • pydna_setuptools_build_workflow.yml
  • pydna_conda_build_workflow.yml

The pydna_test_and_coverage_workflow.yml is triggered on all pushed non-tagged commits. This workflow run tests, doctests and a series of Jupyter notebooks using pytest.

The two other workflows build a setuptools wheel and packages for different Python versions on Linux, Windows and macOS.

These are triggered by publishing a github release manually from the github interface.

🦠

🇵🇹

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].