Bio

1.8.1 · active · verified Sat Apr 11

The 'bio' library provides common bioinformatics algorithms and data structures implemented in Python. It is a lightweight alternative to larger bioinformatics packages, focusing on core functionalities like sequence manipulation, alignment, and motif analysis. The current version is 1.8.1, with a release cadence of a few updates per year, mainly for bug fixes and minor feature enhancements.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates basic sequence manipulation, including creating DNA sequences, obtaining reverse complements, transcribing to RNA, and translating to protein using the `bio.seq` module.

from bio import seq

# Create a DNA sequence object
dna_sequence = seq.Seq("ATGATCCAGGGC", seq.DNA)

# Get the reverse complement
reverse_complement = dna_sequence.rc()
print(f"Original DNA: {dna_sequence}")
print(f"Reverse complement: {reverse_complement}")

# Get the RNA transcription
rna_sequence = dna_sequence.transcribe()
print(f"RNA: {rna_sequence}")

# Translate to protein (starts from first codon)
protein_sequence = rna_sequence.translate()
print(f"Protein: {protein_sequence}")

view raw JSON →