Skip to main content

A lightweight and easy-to-use python bioinformatics toolkit.

Project description

omiBio

- A Lightweight Bioinformatics Toolkit / 轻量生信工具包

Latest Version Python 3.9+ License: MIT flake8

Introduction / 简介

omiBio is a lightweight, user-friendly Python toolkit for bioinformatics — ideal for education, research, and rapid prototyping.

Key features:

  • Robust data structures: Sequence, Polypeptide, Gene, Genome, etc., with optional validation.
  • Simple I/O: Read/write bioinformatics files (e.g., FASTA) with one-liners.
  • Analysis tools: GC content, ORF detection, consensus sequences, sliding windows, and more.
  • CLI included: Run common tasks from the terminal .
  • Basic visualization: Built-in plotting (via matplotlib) for quick insights.
  • Functional & OOP APIs: Use classes or convenient wrapper functions.

Modules Overview / 模块概览

The omiBio toolkit is organized into the following modules:

Module Purpose Key Classes / Functions
omibio.sequence Sequence-type data structures Sequence, Polypeptide
omibio.bioObjects Biological objects and data containers SeqInterval, Gene, Genome
omibio.io File I/O for common bioinformatics formats read(), write()
omibio.analysis Sequence analysis functions GC_content, sliding_gc, find_orfs
omibio.utils General-purpose utility functions Wrappers, helper functions
omibio.cli Command-line interfaces for common workflows omibio orf, other CLI commands

Usage example / 使用示例

Creating a sliding window GC chart using omiBio:

from omibio.analysis import sliding_gc, draw_sliding_gc
from omibio.sequence import Sequence
from omibio.io import read

# Load sequences from FASTA (returns dict[str, Sequence])
seq_dict = read("examples/example.fasta")
dna: Sequence = seq_dict["example"]

# Compute GC content in sliding windows (window=200 bp, step=20 bp)

gc_list = sliding_gc(dna, window=200, step=20)

# Visualize easily
draw_sliding_gc(gc_list, seq=dna, window_avg=True)

The above code will produce results like this:

Example


Using omiBio's Command-line interfaces:

$ omibio orf example.fasta --min-length 100

The above CLI will produce results like this:

# Seq-name  start    end   strand   frame   length
example_2    70      289     -       -2      219
example_16   53      257     +       +3      204
example_13   118     301     +       +2      183
example_4    92      272     -       -1      180
example_2    157     322     +       +2      165
example_5    17      173     -       -1      156
example_16   176     332     -       -1      156
...

Installation / 安装

From PyPI:

$ pip install omibio

Requirements

  • Python: >= 3.9
  • Core dependencies:
    • click (for CLI)
  • Optional dependencies (install for extra features):
    • matplotlib → enables visualization

Optional deps won't be installed by default. To get them:

pip install omibio[plot]

For complete project build and dependency configuration, please refer to pyproject.toml

Code Style

omiBio follows PEP 8 conventions for Python code.
All code is automatically formatted and checked using flake8.

License

This project is licensed under the MIT License.

Things to note

  • Most of the code in this project uses 0-based indexes, half-open interval, rather than the 1-based indexes commonly used in biology.
  • All code type hints in this project use PEP 585 generic syntax in Python 3.9+.
  • This project is still under development and not yet ready for production. Please use it with caution. If you have any suggestions, please contact us:

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

omibio-0.1.2.post1.tar.gz (28.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

omibio-0.1.2.post1-py3-none-any.whl (33.4 kB view details)

Uploaded Python 3

File details

Details for the file omibio-0.1.2.post1.tar.gz.

File metadata

  • Download URL: omibio-0.1.2.post1.tar.gz
  • Upload date:
  • Size: 28.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for omibio-0.1.2.post1.tar.gz
Algorithm Hash digest
SHA256 933118b0981e5567aa2a61c967e4caea2bd9e16d5eb8299ee3a00e8436418798
MD5 3c2ba1a2440fe6fe34c94e8226cda79d
BLAKE2b-256 58871edc45e5871f272ef5a472f121160b896a3ed9f3612809e75f0d839867f0

See more details on using hashes here.

File details

Details for the file omibio-0.1.2.post1-py3-none-any.whl.

File metadata

  • Download URL: omibio-0.1.2.post1-py3-none-any.whl
  • Upload date:
  • Size: 33.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for omibio-0.1.2.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 2a9e7725f05a12250a7abde41597e48f2b558779c2987c4327efde11968d31bb
MD5 18929afc41a958a5e0c01b384764bd80
BLAKE2b-256 cd68492caf23255460033cef20659a22ffb53e4070030a355190ad22a89e3ed0

See more details on using hashes here.

Supported by

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