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.39.0-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54b24e9d64b8ef4669e90a207c14321de253637e7dac8ea242fc7566f018635f |
|
MD5 | 696ab03ed3a77467867e5c7729cf9dbf |
|
BLAKE2b-256 | 15289aaed80685093a36dd8cbd68f691942ffc49a29a51af7192dcc391fb6249 |
Hashes for biotite-0.39.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b2e79cef19ee6f5af5428a30fb46ad94a3c6f11d20a5fdf72a6b0403e5517f7 |
|
MD5 | 661cdc4bd163b6fd76b881686d6ef44b |
|
BLAKE2b-256 | 59f3433401057ec659f87da178bac856627f1942cfeb49dd0c5941a5b9166144 |
Hashes for biotite-0.39.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6def8c214724df542406b59aa7d1d8e26172e03abf0ce4727a00374090167e3 |
|
MD5 | 441fb5492eeee153371e5c5faecd1c58 |
|
BLAKE2b-256 | d9a9c6c3c259e2fcc7afd107e483f0b8314b1ea106951c6efedfe29ae008cdaf |
Hashes for biotite-0.39.0-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c9f82f0ebff66bc4b610cf2f582e53a1075988f65efda456b0496524b7305e7 |
|
MD5 | ff2fbe2731d568ff25330573effd2844 |
|
BLAKE2b-256 | 30421ab20e36d8113b3f5960c2775f608a418b45038ceac7c5b2830bb4000cd4 |
Hashes for biotite-0.39.0-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6da2300d214bb60576db4e5b6773eea1511b3c735b2708f896f6604e5f34f540 |
|
MD5 | 8ace0635665a95c57ce686dabfef5a68 |
|
BLAKE2b-256 | 5d8480a141dcf6997fd471012b767d53959ba2a37512840342e218993263f455 |
Hashes for biotite-0.39.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5208242838f7c5218423e9578c61cf2d2c3530ff465ec6352786297023e5e61 |
|
MD5 | fc34bc7c597887bb05c2b35fef1a2b38 |
|
BLAKE2b-256 | ab261b573906df7bdcb520fb689fd4beb64f5b3f4e746f36ff9ffaa052d362db |
Hashes for biotite-0.39.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72ff0921e882be410ffa1aa5919080069164aa9bbe3ffba0a612b5aab961690d |
|
MD5 | 9e3925fc925a1bfee0952ec1f2e00451 |
|
BLAKE2b-256 | a9858bf4e394dec38ed224c8e8cb9708d20570e5813f3e45667274b9dc784407 |
Hashes for biotite-0.39.0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 18baabe424c34106fb6da7e9036a2bc72067745cd5a5fc13393cb21cc18f4552 |
|
MD5 | d40b11b960cfe2fcdbee9427c1e91c6a |
|
BLAKE2b-256 | 800f50bf10819d4b8913cf21a16e6db3855a4cafec446fa4245cef308c17f655 |
Hashes for biotite-0.39.0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a37c854ecf95d5e0cbe80bb31035e1c5df14d5502028c55e10d8dc6b34b03af |
|
MD5 | 11c02badbacf0333b48fdac64288ae34 |
|
BLAKE2b-256 | 695aac6df75cc2cefb44917a06b070c426fe88cafbd093b7b2608d2897697eb4 |
Hashes for biotite-0.39.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73b66732f587db3c1e2973a04549d114ec793da04b5eac8587b0ec69991ecd3f |
|
MD5 | 5165779ed3081cfb64e376ba94ab1522 |
|
BLAKE2b-256 | 71b259edbee627d04349b225b1f0e7557bf36c4506fa8e3a1d396c4927d1f7c5 |
Hashes for biotite-0.39.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43b36ccb78859513cc04e6c9b7425a88dff8ee402c60de0777e6123f7829150b |
|
MD5 | 32d5b6d0550797fb2b90709af95e3924 |
|
BLAKE2b-256 | 9d8156bddb31de6685bbd67a687ad7213be470a5925b7577d877a7ea7f84263d |
Hashes for biotite-0.39.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 700acc9be058d364d99145cf209fb0ec00a02507e06a9c68011c4e1d4d665954 |
|
MD5 | 9b4caec5a8bbdb455d2fbfbb6ac02ca0 |
|
BLAKE2b-256 | f92c7213677cf50522af8646e4f9fab6bbeb711b1673712d5503929f43b5f33d |