Metadata-Version: 2.5
Name: opbio
Version: 2.1.0
Summary: Bioinformatics utilities for sequence analysis, alignment, phylogeny, BLAST search, genome analysis, and ML classification.
Author-email: opbio author <author@example.com>
License: MIT
License-File: LICENSE
Keywords: alignment,bioinformatics,biology,blast,genomics,phylogeny,sequence
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# opbio

**opbio** is a Python package for common bioinformatics tasks, including DNA/RNA sequence manipulation, pairwise and multiple sequence alignment, phylogenetic tree construction, BLAST/NCBI search, genome variant analysis, and machine learning classification for biological data.

## Installation

```bash
pip install opbio
```

For 3D structure visualization support:

```bash
pip install opbio[visual]
```

## Quick Start

```python
from opbio import (
    verify_sequence,
    reverse_complement_string,
    transcribe,
    translate,
    needleman_wunsch,
    smith_waterman,
    build_distance_matrix,
    plot_phylogenetic_tree,
    count_nucleotides,
    compare_sequences,
    fetch_gene_from_ncbi,
    classification_metrics,
)

# Verify a DNA sequence
print(verify_sequence("ATGCGT"))  # DNA

# Reverse complement
print(reverse_complement_string("ATGCGT"))  # ACGCAT

# Transcribe DNA to RNA
print(transcribe("ATGCGT"))  # AUGCGU

# Translate DNA to protein
print(translate("ATGCGT"))  # MR

# Needleman-Wunsch global alignment
print(needleman_wunsch("GAATTC", "GATAC"))

# Smith-Waterman local alignment
print(smith_waterman("GAATTC", "GATAC"))

# Count nucleotides
count_nucleotides("ACTGGACTTTAC")

# Compare two sequences
compare_sequences("ACGT", "ACAT")
```

## Features

| Module | Description |
|--------|-------------|
| `opbio.sequence` | DNA/RNA verification, reverse complement, transcription, translation, random sequence generation |
| `opbio.alignment` | PairwiseAligner (global/local), Needleman-Wunsch, Smith-Waterman |
| `opbio.phylogeny` | Distance matrices, phylogenetic tree plots, closest pair detection |
| `opbio.search` | Sequence reading, comparison, match percentage, nucleotide/amino acid counting |
| `opbio.homology` | UniProt sequence retrieval, BLAST vs PDB, 3D structure visualization |
| `opbio.multi_organism` | FASTA loading, consensus regex pattern generation |
| `opbio.genome` | NCBI Entrez gene fetching, feature listing, promoter extraction, VCF parsing |
| `opbio.classification` | ML pipelines (DT, RF, SVM), CV, GridSearchCV, k-mer DNA classifier |
| `opbio.preprocessing` | Gene expression preprocessing (imputation, normalization, selection, PCA) |

## Requirements

- Python >= 3.9
- biopython, numpy, pandas, scikit-learn, scipy, matplotlib, seaborn
- Optional: py3Dmol, ipython (for 3D visualization)

## License

MIT