A comprehensive library for computational molecular biology
Project description
Biotite project
Biotite is your Swiss army knife for bioinformatics. Whether you want to identify homologous sequence regions in a protein family or you would like to find disulfide bonds in a protein structure: Biotite has the right tool for you. This package bundles popular tasks in computational molecular biology into a uniform Python library. It can handle a major part of the typical workflow for sequence and biomolecular structure data:
Searching and fetching data from biological databases
Reading and writing popular sequence/structure file formats
Analyzing and editing sequence/structure data
Visualizing sequence/structure data
Interfacing external applications for further analysis
Biotite internally stores most of the data as NumPy ndarray objects, enabling
fast C-accelerated analysis,
intuitive usability through NumPy-like indexing syntax,
extensibility through direct access of the internal NumPy arrays.
As a result the user can skip writing code for basic functionality (like file parsers) and can focus on what their code makes unique - from small analysis scripts to entire bioinformatics software packages.
If you use Biotite in a scientific publication, please cite:
Installation
Biotite requires the following packages:
numpy
requests
msgpack
networkx
Some functions require some extra packages:
mdtraj - Required for trajetory file I/O operations.
matplotlib - Required for plotting purposes.
Biotite can be installed via Conda…
$ conda install -c conda-forge biotite
… or pip
$ pip install biotite
Usage
Here is a small example that downloads two protein sequences from the NCBI Entrez database and aligns them:
import biotite.sequence.align as align
import biotite.sequence.io.fasta as fasta
import biotite.database.entrez as entrez
# Download FASTA file for the sequences of avidin and streptavidin
file_name = entrez.fetch_single_file(
uids=["CAC34569", "ACL82594"], file_name="sequences.fasta",
db_name="protein", ret_type="fasta"
)
# Parse the downloaded FASTA file
# and create 'ProteinSequence' objects from it
fasta_file = fasta.FastaFile.read(file_name)
avidin_seq, streptavidin_seq = fasta.get_sequences(fasta_file).values()
# Align sequences using the BLOSUM62 matrix with affine gap penalty
matrix = align.SubstitutionMatrix.std_protein_matrix()
alignments = align.align_optimal(
avidin_seq, streptavidin_seq, matrix,
gap_penalty=(-10, -1), terminal_penalty=False
)
print(alignments[0])
MVHATSPLLLLLLLSLALVAPGLSAR------KCSLTGKWDNDLGSNMTIGAVNSKGEFTGTYTTAV-TA
-------------------DPSKESKAQAAVAEAGITGTWYNQLGSTFIVTA-NPDGSLTGTYESAVGNA
TSNEIKESPLHGTQNTINKRTQPTFGFTVNWKFS----ESTTVFTGQCFIDRNGKEV-LKTMWLLRSSVN
ESRYVLTGRYDSTPATDGSGT--ALGWTVAWKNNYRNAHSATTWSGQYV---GGAEARINTQWLLTSGTT
DIGDDWKATRVGINIFTRLRTQKE---------------------
-AANAWKSTLVGHDTFTKVKPSAASIDAAKKAGVNNGNPLDAVQQ
More documentation, including a tutorial, an example gallery and the API reference is available at https://www.biotite-python.org/.
Contribution
Interested in improving Biotite? Have a look at the contribution guidelines. Feel free to join or community chat on Discord.
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 biotite-0.36.1-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93c764a4f89581404b2fb00fce9549c41a6de71ba87b8bf4c268650b8927e0c8 |
|
MD5 | 7ddc6be18ab014017324820410074d3a |
|
BLAKE2b-256 | 0f6f316bc061528e3395cdb4e5559844377409132b682f982308bdeb3635785f |
Hashes for biotite-0.36.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 058bcbecee4b2a6714390f5cf6ae522dd97e6d72dcbead6052e4e71b35c9d495 |
|
MD5 | e29ef02fa5bc3fb24c4b16437596b59a |
|
BLAKE2b-256 | 489e0d12ba9d0e552c69bc9832969666069115830c8feec3feaded29c90646ed |
Hashes for biotite-0.36.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e0a15aa1020d2ac81a9881f1161dd756645305d20fd9a4134acc55fadf3583f |
|
MD5 | 145bf76d3642a938addf9b6a5e810200 |
|
BLAKE2b-256 | 6270c5ce4d25b896c2a42d76fe1706fde79ce5f8715eca89d90a42908fd8a13a |
Hashes for biotite-0.36.1-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a20636d6b598cadf2b7f098751410211ceef99db4ece3bb947860644f2f0593c |
|
MD5 | bf972bbfeb3732146b3d5bd16e3f4b96 |
|
BLAKE2b-256 | 28651c7a90de0ebf54573527f8ec8845f3cfbc8156b1a69144693d8bbc32b933 |
Hashes for biotite-0.36.1-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f44097b4f8502cd00bc275255536c5350341a8220c3b6a48c9ec66eeea58cf01 |
|
MD5 | 66680f63807d88d4366f5cf8893dd9f4 |
|
BLAKE2b-256 | b2f2fb932e2caa7fad7ee60e58ac6cbf6837cde9575d84eec3824f3acdb24140 |
Hashes for biotite-0.36.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1cab2d522917683af005b5878c97542ea163653b2102cd7c4fa72808853f6857 |
|
MD5 | f7e1e9d6317b69ece055483246cc86d1 |
|
BLAKE2b-256 | 8f065aa157fa823f976bb0b2ad7e950b7f779f230e58ede495d747866d19e097 |
Hashes for biotite-0.36.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f7c02977ffc79d7d49fd87a92fda436152bc1047bbd9e884f3cb47258885dc1 |
|
MD5 | 0fa8df795305094a841ffedf205fa19a |
|
BLAKE2b-256 | 232a6fd9288bc373fba5f17724c59a688f4f6fb55cb162aff76b7aaab3333352 |
Hashes for biotite-0.36.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 503591a6ae06e7c53cfbe4e419b0c771c90b1cc1c8313e3c4781dccc88df1254 |
|
MD5 | 92cdd33057bb57492afa32581781e9cf |
|
BLAKE2b-256 | 67625107bfdb0047fb7c57b0af4ddecfbbd81917fe320b05b6db08b5e5d83c02 |
Hashes for biotite-0.36.1-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b61c1c6699b29ffe312bf950bb51533478a66894cea2144f20a9ac1b1b02b20c |
|
MD5 | 1ecc5df1ad0818f33201c431680bb2eb |
|
BLAKE2b-256 | aa2f55bd34600bd0891f2af7e95ebade905d33f974f608590dbebee5f8066c12 |
Hashes for biotite-0.36.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 342efa7e28ebe1fdb4bc04d366c088ac7f04132f8ebeb54d035f0e96f82b3e18 |
|
MD5 | e6e6be4269aaa5e78d0a607f76454ede |
|
BLAKE2b-256 | b37983679caf60476b171921c1625c917d2b6d76e48cc9095ee4879787cb67de |
Hashes for biotite-0.36.1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 561da89ed9de91914a5a829858852314e5073ff7b0505a5dd99e7c77cfd7219b |
|
MD5 | d4be9e9fffc63cf3965b36f82c07b6b2 |
|
BLAKE2b-256 | 55ed43dcd9f50cfe44facfd52ca81bfa7d7229b8d6506be4353d23b8b8fd429f |
Hashes for biotite-0.36.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5ba4f3ea56439fd70a80b1f996680ba814da56ab2febae7fa20452b69d24c18 |
|
MD5 | 4000253f1e6bb11cca373769cf99914f |
|
BLAKE2b-256 | 1e2fe5dfccb5df734068df806b5b688b17ccf86934c5b292ee710aa02ee70e0c |