Skip to main content

A comprehensive library for computational molecular biology

Project description

Biotite at PyPI Python version Test status The Biotite Project

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:

Kunzmann, P. & Hamacher, K. BMC Bioinformatics (2018) 19:346.

Installation

Biotite requires the following packages:

  • numpy

  • requests

  • msgpack

  • networkx

Some functions require some extra packages:

  • 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 our community chat on Discord.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

biotite-1.0.1.tar.gz (17.4 MB view details)

Uploaded Source

Built Distributions

biotite-1.0.1-cp312-cp312-win_amd64.whl (20.3 MB view details)

Uploaded CPython 3.12 Windows x86-64

biotite-1.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (36.8 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

biotite-1.0.1-cp312-cp312-macosx_11_0_arm64.whl (20.4 MB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

biotite-1.0.1-cp312-cp312-macosx_10_9_x86_64.whl (20.7 MB view details)

Uploaded CPython 3.12 macOS 10.9+ x86-64

biotite-1.0.1-cp311-cp311-win_amd64.whl (20.4 MB view details)

Uploaded CPython 3.11 Windows x86-64

biotite-1.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (34.9 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

biotite-1.0.1-cp311-cp311-macosx_11_0_arm64.whl (20.5 MB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

biotite-1.0.1-cp311-cp311-macosx_10_9_x86_64.whl (20.7 MB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

biotite-1.0.1-cp310-cp310-win_amd64.whl (20.4 MB view details)

Uploaded CPython 3.10 Windows x86-64

biotite-1.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (33.9 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

biotite-1.0.1-cp310-cp310-macosx_11_0_arm64.whl (20.5 MB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

biotite-1.0.1-cp310-cp310-macosx_10_9_x86_64.whl (20.7 MB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

File details

Details for the file biotite-1.0.1.tar.gz.

File metadata

  • Download URL: biotite-1.0.1.tar.gz
  • Upload date:
  • Size: 17.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for biotite-1.0.1.tar.gz
Algorithm Hash digest
SHA256 7012158431fd488c26d78d33032550eea1d7af7afd01b48549a7fd239f63dab5
MD5 03f002f053fba77b380b6b750f9c2128
BLAKE2b-256 b6f8e11dcacc3f600b4f1a9aaa8bba59b6ec5e5e6665ab72a79630771d903de8

See more details on using hashes here.

File details

Details for the file biotite-1.0.1-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: biotite-1.0.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 20.3 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for biotite-1.0.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 3cc6e834eee0e6a9b19fbf8caa1316ff432b613587fbadb8ea60e34fe80b8fc5
MD5 aec9d62b635d2c71af5ded4f4600c9b0
BLAKE2b-256 2fd4840a5a2c105c23c8fc44a21bd11f9c234327ccfe4c11fdf440d90f0e805c

See more details on using hashes here.

File details

Details for the file biotite-1.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for biotite-1.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0e112e515adb7f7eebb91dd9fb59fac354561c16079061610eb0a86605cb949d
MD5 42b440081c569415df7419b0ff9d5d13
BLAKE2b-256 2afc009969cec075b00aad6bf0d20e26c6c5192da042aa16bd8cca5d574df174

See more details on using hashes here.

File details

Details for the file biotite-1.0.1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for biotite-1.0.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8574396ec38372d91aeda690e7b683c7214fcda1e5ecbb645922a628794750fb
MD5 7f03d5d62c69ad33da0e762a4b41ca52
BLAKE2b-256 5386a7cf8d2f212067ba7491fb92e20efcff23f9cd9dc0c829ee406b903e9ef4

See more details on using hashes here.

File details

Details for the file biotite-1.0.1-cp312-cp312-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for biotite-1.0.1-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a00d3f5ddb870d2b5231392712edc523f7a08c86048d8710d8583996b7b66579
MD5 363558fe3b26daf4240ef0936cc99b42
BLAKE2b-256 075518a91106f07774bd3ddf39b27b774f911bba615b65ab92e6cd364e3764b2

See more details on using hashes here.

File details

Details for the file biotite-1.0.1-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: biotite-1.0.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 20.4 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for biotite-1.0.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 abf66c2bc3395ef629a1e2675e29ac2e76dce892a6b6e1c54b5df0ad9d83631e
MD5 3d552811e04457c51ea21f390aefdcb5
BLAKE2b-256 c01c3a951a76081bb1fa39fc3bbc24dd47a0d8ba9242f9f3596bc30a1eb94645

See more details on using hashes here.

File details

Details for the file biotite-1.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for biotite-1.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c2c6facb30d8ac348a5f816c9c043a3a7986e8849f11a6de4eec9938cbe9f3c4
MD5 285cac1801da08768604a2d2e164c99f
BLAKE2b-256 0b4ec37f81b45e5b08cc3472ffd0698f8bafa32fc1855b217eb3d12199238c9e

See more details on using hashes here.

File details

Details for the file biotite-1.0.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for biotite-1.0.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7a0babf7d8f15c39c905e1b61afb05569262b90f323f7f90ca6f0ae2bf5c0759
MD5 9382a5e36e6c5afa4739abd8c0389ccd
BLAKE2b-256 da834e2a30f6fa32907efc8ae82c06aa61bb375ebc639cf8d7b237ded7c68819

See more details on using hashes here.

File details

Details for the file biotite-1.0.1-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for biotite-1.0.1-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ebc28860990c8be2a41b94c25b1956ee89e034954cdeff2e6731b55608e16358
MD5 048579554fa452537a9a4adce24e2532
BLAKE2b-256 6a30ecb4f706826e9e3b192c58e6d033269b6a77545b8dc65a75d39c76b029d4

See more details on using hashes here.

File details

Details for the file biotite-1.0.1-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: biotite-1.0.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 20.4 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for biotite-1.0.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 9f2edcc80672849f751c6efae6a4a9fe711300bdc523aa057ec1f11e6636135c
MD5 460cf7c65e72b37ec984ecf82d9dd080
BLAKE2b-256 8c5894382a9146c646a11faf40f52de8913cb5c3039ac71c2135f674334d3ef4

See more details on using hashes here.

File details

Details for the file biotite-1.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for biotite-1.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7d6fef30a95c99951eb7d15dd7dd75123118ce4a1aa4becec8c6cd52462775b8
MD5 e7a222f1d22854adc5846338e87ed681
BLAKE2b-256 c3ff95aba0595f7b03c1945a39a2de921bfe12bc1535dae1dc4613d6c357f0d1

See more details on using hashes here.

File details

Details for the file biotite-1.0.1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for biotite-1.0.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7ccd34d524318cd1f5991b795c8c7c1cabc3f95cce8d68d64bb27071b18168f7
MD5 5bc075fc8bd60c6596c6fa6c21dab488
BLAKE2b-256 09a0b6af9d21f3253bfbeee77fd13cd698c52e392f55b2da88a52b170ac40cb1

See more details on using hashes here.

File details

Details for the file biotite-1.0.1-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for biotite-1.0.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 b1e64bde3c21c7140318c4a917f350dd569211edb84265f9b4c4d6f06a8e861e
MD5 7456cde6c56f16680c0b6590b0ca37ff
BLAKE2b-256 9dec92a21e946ea2541e9522b4ab6f4a7168eb9e54d994a5fbdb6bc6cf2e52a4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page