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.40.0-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92c900800f7d205d64f82ffce6c6da8cae4c1ecdf3a08db6c285810a8ff76d30 |
|
MD5 | b43ece610bcbdba43a400bc896dce564 |
|
BLAKE2b-256 | fd835f22b2609ff05f0c46e19987d50f1927fc2a495539a900a9cae0a4e4be00 |
Hashes for biotite-0.40.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81968f6fd24df76c091c2c864dd811107e8a68a31717cd9ef3a48cfe42a6b589 |
|
MD5 | 5c78a8f72f4138dca686defbfcba7ec5 |
|
BLAKE2b-256 | 0cfbb3cb02519ea5f867451f6894d338f67169f10733840b751fd4b34ada9392 |
Hashes for biotite-0.40.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d2b8d45662325b70a84a42b7a5fff331223fc7766caf5b5637d4893f5124dbc |
|
MD5 | 8934838d2ec5e8bd6b2c7b2764ef31cf |
|
BLAKE2b-256 | f0d81bf2422d705f40250d0a3f44daebb62f5d57e3b78834fa0987d8b2e4f1b0 |
Hashes for biotite-0.40.0-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1adaeea60af86ba3aee551bed36c20bd0f221271005464d071a7091129f59489 |
|
MD5 | ba8ff0f4081d215c96082f75b4d3336c |
|
BLAKE2b-256 | 6b4e72c788e802c1b1d2be89045369839bcd8758a2419b314397dd49de68bcf4 |
Hashes for biotite-0.40.0-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6123af73d6ff4e07798b35cf73b4dd59c385595bdf4d6cdc7aa5223929f67b5c |
|
MD5 | d03cba85b6bb4f5bbe8639f26367b2c3 |
|
BLAKE2b-256 | d37a56ffbfd2c4bc6a1986f163ace756d1adfccf7683760f6389a345148aab5d |
Hashes for biotite-0.40.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d6d13e0a2226fdb0eaee9980b173fd139bf4d16462076af36ca637b87b5bc90 |
|
MD5 | 83dc524e01cc432aa345f7ae10b96185 |
|
BLAKE2b-256 | 17acf9dd997ce9e760f7b756425d004e68dee6c8556558b2d58fcd7ef89436d0 |
Hashes for biotite-0.40.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2642c0b90f330fa112f9b3010a3ef70375a2ff2c672787cd8d07c2c0a0a137cd |
|
MD5 | 7e4c6faa9cd1b2015b7aa41b642fc33a |
|
BLAKE2b-256 | f49fd8b54b623844f73946854015d39eda1da8f5f1d1b6d60d3d3fff159e0417 |
Hashes for biotite-0.40.0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0abbfe8b7370092640825592e953601ab4b997c783da47175c12c7a8c9a31d62 |
|
MD5 | 2350323b24809b2660a0c92f3c757ada |
|
BLAKE2b-256 | 67fe1532a0cc0217d7e75ba6e05179cc7ec850abb4358557716f2fc167bf86be |
Hashes for biotite-0.40.0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a5ad7caaa542eaed4ef9b1cec949e9b663ad788f4e9071ac3fad096e406fbb8 |
|
MD5 | 3090b18c0e9e799aac79a20d22b19922 |
|
BLAKE2b-256 | def4d31f32ddacddc5c60ee6ee896b778919c735bd2c392863dc4bb560246ff6 |
Hashes for biotite-0.40.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb72b991c96370d5d8eaddc4c5fe2b1ab138aef409ca31d0ae5f782275cb97bc |
|
MD5 | 38b85888f0838887c44fb6583175c978 |
|
BLAKE2b-256 | a26c677c93014ff64c93b9162836a9716b2c3da6f830f5223b7e0ff32ede7982 |
Hashes for biotite-0.40.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58109645e21387598f884ccf4896a4eec1720b4278f76cf44c06d33cf2e77ec0 |
|
MD5 | daf2ef6caffacf7a614ee03483505216 |
|
BLAKE2b-256 | 81eb098d255645cefadd3d912ea325567795daa6bbbe2efe07171e45343b1b27 |
Hashes for biotite-0.40.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6038bdb81fc4fd5f0e1330a287b93f765f1def6c9827c14a7e7f9a2dc078995f |
|
MD5 | d44a1748a7815e7f42b0049aeccebd0f |
|
BLAKE2b-256 | 9a8af1ecd9cfd530baed03560e0a20f6620872eb730e0f41f4305a016556a656 |