Freely available tools for computational molecular biology.
Project description
Biopython README file
The Biopython Project is an international association of developers of freely available Python tools for computational molecular biology.
Our user-centric documentation is hosted on http://biopython.org including the main Biopython Tutorial and Cookbook:
This README file is intended primarily for people interested in working with the Biopython source code, either one of the releases from the http://biopython.org website, or from our repository on GitHub https://github.com/biopython/biopython
The NEWS file summarises the changes in each release of Biopython.
The Biopython package is open source software made available under generous terms. Please see the LICENSE file for further details.
If you use Biopython in work contributing to a scientific publication, we ask that you cite our application note (below) or one of the module specific publications (listed on our website):
Cock, P.J.A. et al. Biopython: freely available Python tools for computational molecular biology and bioinformatics. Bioinformatics 2009 Jun 1; 25(11) 1422-3 http://dx.doi.org/10.1093/bioinformatics/btp163 pmid:19304878
For the impatient
Python 2.7.9 onwards, and Python 3.4 onwards, include the package management system “pip” which should allow you to install Biopython (and its dependency NumPy if needed), upgrade or uninstall with just one terminal command:
pip install biopython pip install --upgrade biopython pip uninstall biopython
Since Biopython 1.70 we have provided pre-compiled binary wheel packages on PyPI for Linux, Mac OS X and Windows. This means pip install should be quick, and not require a compiler.
As a developer or potential contributor, you may wish to download, build and install Biopython yourself. This is described below.
Python Requirements
We currently recommend using Python 3.6 from http://www.python.org
Biopython is currently supported and tested on the following Python implementations:
Python 2.7, 3.4, 3.5, 3.6 – see http://www.python.org
Python 3 is the primary development platform for Biopython. We will drop support for Python 2.7 no later than 2020, in line with the end-of-life or sunset date for Python 2.7 itself.
PyPy2.7 v5.10.0, or PyPy3.5 v5.10.1 – see http://www.pypy.org
Aside from Bio.trie (which does not compile as marshal.h is currently missing under PyPy), everything should work. Older versions of PyPy mostly work too.
Jython 2.7 – see http://www.jython.org
We have decided to deprecate support for Jython, but aside from Bio.Restriction, modules with C code, or dependent on SQLite3 or NumPy, everything should work. There are some known issues with test failures which have not yet been resolved.
Biopython 1.68 was our final release to support Python 2.6.
Optional Dependencies
Biopython requires NumPy (see http://www.numpy.org) which will be installed automatically if you install Biopython with pip (see below for compiling Biopython yourself).
Depending on which parts of Biopython you plan to use, there are a number of other optional Python dependencies, which can be installed later if needed:
ReportLab, see http://www.reportlab.com/opensource/ (optional) This package is only used in Bio.Graphics, so if you do not need this functionality, you will not need to install this package.
matplotlib, see http://matplotlib.org/ (optional) Bio.Phylo uses this package to plot phylogenetic trees.
networkx, see http://networkx.lanl.gov/ (optional) and pygraphviz or pydot, see http://networkx.lanl.gov/pygraphviz/ and http://code.google.com/p/pydot/ (optional) These packages are used for certain niche functions in Bio.Phylo.
rdflib, see https://github.com/RDFLib/rdflib (optional) This package is used in the CDAO parser under Bio.Phylo.
psycopg2, see http://initd.org/psycopg/ (optional) or PyGreSQL (pgdb), see http://www.pygresql.org/ (optional) These packages are used by BioSQL to access a PostgreSQL database.
MySQL Connector/Python, see http://dev.mysql.com/downloads/connector/python/ This package is used by BioSQL to access a MySQL database, and is supported on Python 2 and 3 and PyPy too.
MySQLdb, see http://sourceforge.net/projects/mysql-python (optional) This is an older alternative package used by BioSQL to access a MySQL database, but it is not available for Python 3 or PyPy.
Note that some of these libraries are not available for PyPy or Jython, and not all are available for Python 3 yet either.
In addition there are a number of useful third party tools you may wish to install such as standalone NCBI BLAST, EMBOSS or ClustalW.
Installation From Source
We recommend using the pre-compiled binary wheels available on PyPI using:
pip install biopython
However, if you need to compile Biopython yourself, the following are required at compile time - unless you are using Jython (support for which is deprecated).
Python including development header files like python.h, which on Linux are often not installed by default (trying looking for and installing a package named python-dev or python-devel as well as the python pacakge).
Appropriate C compiler for your version of Python, for example GCC on Linux, MSVC on Windows. For Mac OS X, or as it is now branded, macOS, use Apple’s command line tools, which can be installed with the terminal command:
xcode-select --install
This will offer to install Apple’s XCode development suite - you can, but it is not needed and takes a lot of disk space.
NumPy, see http://www.numpy.org - this package is used in Bio.Cluster, Bio.PDB and a few other modules. We use the NumPy C API, which means it must be installed before compiling Biopython’s C code.
Then either download and decompress our source code, or fetch it using git. Now change directory to the Biopython source code folder and run:
python setup.py build python setup.py test sudo python setup.py install
Substitute python with your specific version, for example python3, pypy or jython.
If you need to do additional configuration, e.g. changing the install directory prefix, please type python setup.py, or see the documentation here:
Testing
Biopython includes a suite of regression tests to check if everything is running correctly. To run the tests, go to the biopython source code directory and type:
python setup.py build python setup.py test
Do not panic if you see messages warning of skipped tests:
test_DocSQL ... skipping. Install MySQLdb if you want to use Bio.DocSQL.
This most likely means that a package is not installed. You can ignore this if it occurs in the tests for a module that you were not planning on using. If you did want to use that module, please install the required dependency and re-run the tests.
Some of the tests may fail due to network issues, this is often down to chance or a service outage. If the problem does not go away on re-running the tests, it is possible to run only the offline tests.
There is more testing information in the Biopython Tutorial & Cookbook.
Experimental code
Biopython 1.61 introduced a new warning, Bio.BiopythonExperimentalWarning, which is used to mark any experimental code included in the otherwise stable Biopython releases. Such ‘beta’ level code is ready for wider testing, but still likely to change, and should only be tried by early adopters in order to give feedback via the biopython-dev mailing list.
We’d expect such experimental code to reach stable status within one or two releases, at which point our normal policies about trying to preserve backwards compatibility would apply.
Bugs
While we try to ship a robust package, bugs inevitably pop up. If you are having problems that might be caused by a bug in Biopython, it is possible that it has already been identified. Update to the latest release if you are not using it already, and retry. If the problem persists, please search our bug database and our mailing lists to see if it has already been reported (and hopefully fixed), and if not please do report the bug. We can’t fix problems we don’t know about ;)
Old issue tracker: https://redmine.open-bio.org/projects/biopython
Current issue tracker: https://github.com/biopython/biopython/issues
If you suspect the problem lies within a parser, it is likely that the data format has changed and broken the parsing code. (The text BLAST and GenBank formats seem to be particularly fragile.) Thus, the parsing code in Biopython is sometimes updated faster than we can build Biopython releases. You can get the most recent parser by pulling the relevant files (e.g. the ones in Bio.SeqIO or Bio.Blast) from our git repository. However, be careful when doing this, because the code in github is not as well-tested as released code, and may contain new dependencies.
Finally, you can send a bug report to the bug database or the mailing list at biopython@biopython.org (subscription required). In the bug report, please let us know:
Which operating system and hardware (32 bit or 64 bit) you are using
Python version
Biopython version (or git commit/date)
Traceback that occurs (the full error message)
And also ideally:
Example code that breaks
A data file that causes the problem
Contributing, Bug Reports
Biopython is run by volunteers from all over the world, with many types of backgrounds. We are always looking for people interested in helping with code development, web-site management, documentation writing, technical administration, and whatever else comes up.
If you wish to contribute, please visit the web site http://biopython.org and join our mailing list: http://biopython.org/wiki/Mailing_lists
Distribution Structure
README.rst – This file.
NEWS.rst – Release notes and news.
LICENSE.rst – What you can do with the code.
CONTRIB.rst – An (incomplete) list of people who helped Biopython in one way or another.
DEPRECATED.rst – Contains information about modules in Biopython that are removed or no longer recommended for use, and how to update code that uses those modules.
MANIFEST.in – Configures which files to include in releases.
setup.py – Installation file.
Bio/ – The main code base code.
BioSQL/ – Code for using Biopython with BioSQL databases.
Doc/ – Documentation.
Scripts/ – Miscellaneous, possibly useful, standalone scripts.
Tests/ – Regression testing code including sample data files.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for biopython-1.71-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dccb66a68968c4c76a7ec92d82e44abf8721a2f65c9afb7acdc3deb2457b7b4e |
|
MD5 | dc7149f7297176bf0c8ca80fa176ecb0 |
|
BLAKE2b-256 | 42622afdd2371fa46c64acc3076941d712617c4c8fb1c7b667640a389b802832 |
Hashes for biopython-1.71-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 693e9f2955393438613a431fe9b308d3d39a30923fe1efd32e0000c83feda6e3 |
|
MD5 | 80c03614cb3b4c486793e6e31c62403d |
|
BLAKE2b-256 | 30a4d7b5a5801129d97023ffb63ef4110b8b6964db1f8b9757282017fd3dd618 |
Hashes for biopython-1.71-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ac8e5c2f6ffa1190a491ccc5f00e004d05107abf9879ebdff202088be31d02a |
|
MD5 | d7e15723aac481d945289d179a52a9f9 |
|
BLAKE2b-256 | 555c85a92ad60b984f84ab9fac6cb1418ebe36df811c047888cded9917a0da03 |
Hashes for biopython-1.71-cp36-cp36m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b7f6552b4d9162ca90bc0515a93815a7d81b8b0435932ab0aaf2affc53b40f6 |
|
MD5 | 09fbad06133a8b2b9c3d20faa0d6a156 |
|
BLAKE2b-256 | b0a53ebcdaef1df9f6553944b7f5be8e81202b702d42afdc34d40350214713d4 |
Hashes for biopython-1.71-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f800d7db93685a73fe244d16ab76dec91e51ddcde20a3f9e8dffa3d05170d96 |
|
MD5 | 80cf17e84f22a4ea61e7394a521500f9 |
|
BLAKE2b-256 | eff5647334c341a14ff2840a3eb3e8a69f21938f164c08f35f77efe0af2b85c6 |
Hashes for biopython-1.71-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2603eeb09a7eef41eb81d874901c02e848ad80776f9e80d91b15206e7c4441d |
|
MD5 | 9eb34690189f4c156157e0991852bb56 |
|
BLAKE2b-256 | 4ee64407e7a2a119aaa69918e554fe5e6b897f32144be0e49dc97fe9e6e43952 |
Hashes for biopython-1.71-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23580bf169d044cc749819465520f33579c62ce06816f87f814e4a78fdd48877 |
|
MD5 | cf859db69d1c182f133cd34774ff15ca |
|
BLAKE2b-256 | 51260f4dc89e340382650c0fd5920471c7b105278a6bb60b54fd0e8c5c17c2c3 |
Hashes for biopython-1.71-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c6190b552c5b9e2b2b7456ecc5258f344b1afee63c1d656b610a5c1a4b52b3f |
|
MD5 | 4f1fa297348d4797acab537b44480aaa |
|
BLAKE2b-256 | 6326198e369dd95c50554ccc9ec76719be8e338d171fb30c7f14439653cd9153 |
Hashes for biopython-1.71-cp35-cp35m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 14067b4ae2596979fd82a1e61fafbf2f8acd81f547b09220d8f4d7642a2b3759 |
|
MD5 | 0f5e731a17b3d5798347a21b88224583 |
|
BLAKE2b-256 | 3c7ced3f89ddc479ae6b527339cc17664670fa440cd2aa05a3e670ef9c25da0a |
Hashes for biopython-1.71-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7782271639fb92ea7fde4ad1caeeed3ca4ba6795de81bde391a4ea21e3870fb |
|
MD5 | b5f26e1288f5124a2a02ffeab7139650 |
|
BLAKE2b-256 | 662a1376313b01173e2fe0814880ca695ce39dfc5702292e6bb43a22b5916746 |
Hashes for biopython-1.71-cp34-cp34m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5dca87bfefda68824ce5ef64036efd7232cbd2c22ec124e6fcace62d953321c |
|
MD5 | 26b786d9b1d826e6917d666d617f30b1 |
|
BLAKE2b-256 | 8fc8c813fb16ddb25ec025a58ed25c4ee7e3289f2c13694e9e39650a2aef5fcd |
Hashes for biopython-1.71-cp34-cp34m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 038ecb2376cbfd2b42e79f64fe96ffb4921fecacad6f5157b684168933320455 |
|
MD5 | a2f05c067222c31091ad97c6c394e54d |
|
BLAKE2b-256 | 7cc8fcbc7f13280caa5bb6abbfa9bfb8932ed4d00c8dd6d791ddfe186a36e384 |
Hashes for biopython-1.71-cp34-cp34m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9fabcb8cd0a87c5e2514bc959f5504ea5dc58219bc2ff91e6c689279322319c6 |
|
MD5 | d308f83c49dc38395928348628d24238 |
|
BLAKE2b-256 | 5563795ac9b613c2e9d3c406589e5dec628f90bcca3d5acb73b005be1df47714 |
Hashes for biopython-1.71-cp34-cp34m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20fbbbc0f1c2f11972ea598191ba2cd8cb7ecb38595fa89031b9c3974ebcbdff |
|
MD5 | 53df08929d39abda3c0b668d7d06456c |
|
BLAKE2b-256 | fd437510174e0f7b9842bc93a2324c35f2f84181498eb720a333c703d0ebf127 |
Hashes for biopython-1.71-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b7284947a4b657d7955d0af8c48594be62a4d8dd51b84223fded371e81911d6 |
|
MD5 | 47b6e58c03599b4e8a5534efa9171d0c |
|
BLAKE2b-256 | 3722b6ebf283a70e5fe42265b63b9db4ed9a20e213de90c5bf25d1cf036493d4 |
Hashes for biopython-1.71-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e4c6fe00e1d49e016634602e8554380ec437b505d8f20132da408a37da560ce |
|
MD5 | f80e811aeebf9241e03a6ef3d4c9d9c6 |
|
BLAKE2b-256 | 1beff7cf92ae477994031a39d72f0a6314afaf1be96c6718dd0c7854b979e56c |
Hashes for biopython-1.71-cp27-cp27mu-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4960e0ec35de8b02cd0b6a720db623abf30931a5677046ec06c0097b6a565541 |
|
MD5 | 395e12573e9a56130489aafe3617e254 |
|
BLAKE2b-256 | 981a30473b55d5a7a1e39e478f498e14343f3da874bfbf6074a453b99598eb85 |
Hashes for biopython-1.71-cp27-cp27m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6318172b107ad72abf45a03de6a189a3e7cfc2e682d402520c14bbbe8295e335 |
|
MD5 | 4997d76f075f4840d82f7d596917ba92 |
|
BLAKE2b-256 | e86e01704050f09906e7fe29fa0092de89076cf49c6c3be2dc300f9fb3bb11dc |
Hashes for biopython-1.71-cp27-cp27m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65f00db00b2f91ba90e5bb61c7dd14d2beacb9f2d3e60c9d4330376b693d8975 |
|
MD5 | b98d04351a94eb94a95e57c4ded460c2 |
|
BLAKE2b-256 | af83ad72864f3a24056d31d272505228e1a36f8ee4ab0137efd98575ea6d04f5 |
Hashes for biopython-1.71-cp27-cp27m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3fdf4c9502404dd62905fd70bce57806cb775e636eede5de13f1abe8f0915158 |
|
MD5 | 89e368cbcb6517915ee371f27f459b90 |
|
BLAKE2b-256 | 5fd4f785c7e1c08c41c1773c7bc3e9466709dd07bfc3dba27b9e82a098ad618d |
Hashes for biopython-1.71-cp27-cp27m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7449d7df74a298c190fbc9ad60591577acb2e45d5ff788faa8672df460f3dc4d |
|
MD5 | a85b46133003383e428b05895e5d3613 |
|
BLAKE2b-256 | 21be11b1820bc9f3a7ada50008fa83c7b70ac1d44d6d890c539ea76ba44a7741 |
Hashes for biopython-1.71-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f919aa78031c00e44350742331f5a1eed7b447bde7812abe2ca0f6a5165900bb |
|
MD5 | b2cd1215bacfb7cb9ee73b6b67695da0 |
|
BLAKE2b-256 | 630e321c84b1a21a9715455fdd7a9fc64558f4cd7013db22fae001cfbbdf0be1 |