PyHIV: A Python Package for Local HIV‑1 Sequence Alignment, Subtyping and Gene Splitting
Project description
PyHIV: A Python Package for Local HIV-1 Sequence Alignment, Subtyping, and Gene Splitting
Overview
PyHIV is a Python package that aligns HIV nucleotide sequences against reference genomes to determine the most similar subtype and optionally split the aligned sequences into gene regions.
Key Features:
- 🧬 Local HIV-1 sequence alignment against reference genomes
- 🏷️ Automated subtyping with comprehensive reference database
- ✂️ Gene region splitting (gag, pol, env, etc.)
- 📊 Detailed reporting with summary tables and visualizations
- ⚡ Parallel processing for efficient analysis
- 🖥️ Command-line interface for easy integration
Installation
pip install pyhiv-tools
Quick Start
Command Line Interface
# Basic usage
pyhiv run /path/to/fasta/files
# With custom options
pyhiv run /path/to/fasta/files -o results/ -j 4 -v
# Validate inputs first
pyhiv validate /path/to/fasta/files
Python API
from pyhiv import PyHIV
PyHIV(
fastas_dir="path/to/fasta/files",
subtyping=True,
splitting=True,
output_dir="results_folder",
n_jobs=4,
reporting=True
)
What PyHIV Produces
- Best reference alignment per sequence
- Subtype and reference metadata
- Gene-region–specific FASTA files (optional)
- Final summary table (
final_table.tsv) - PDF reports with sequence visualizations (optional)
Output Structure
PyHIV_results/
├── final_table.tsv # Summary of results
├── best_alignment_<sequence>.fasta # Alignment to best reference
├── PyHIV_report_all_sequences.pdf # PDF report (if enabled)
├── gag/ # Gene regions (if splitting enabled)
│ ├── <sequence>_gag.fasta
│ └── ...
├── pol/
│ ├── <sequence>_pol.fasta
│ └── ...
└── env/
├── <sequence>_env.fasta
└── ...
Requirements
- Python 3.10+
- pandas
- biopython
- pyfamsa
- click
- matplotlib
Documentation
- Full Documentation: https://pyhiv.readthedocs.io/
- CLI Reference: Available in the package documentation
- GitHub Repository: https://github.com/anaapspereira/PyHIV
Citation
If you use PyHIV in your research, please cite:
@software{pyhiv2024,
title={PyHIV: A Python Package for Local HIV-1 Sequence Alignment, Subtyping and Gene Splitting},
author={Santos-Pereira, Ana},
year={2024},
url={https://github.com/anaapspereira/PyHIV},
license={MIT}
}
Note: Manuscript in preparation. Please cite this repository if you use PyHIV in your research.
License
This project is licensed under the MIT License. See LICENSE file for details.
Project Links
- Source Code: https://github.com/anaapspereira/PyHIV
- Issues: https://github.com/anaapspereira/PyHIV/issues
- PyPI Package: https://pypi.org/project/pyhiv-tools/
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 Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyhiv_tools-0.1.0.tar.gz.
File metadata
- Download URL: pyhiv_tools-0.1.0.tar.gz
- Upload date:
- Size: 2.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
510bcbfd1098f96e7f94f986f739c166f53f0350cee3b69beba69668dde45149
|
|
| MD5 |
7265fdb683859a9858e91d9c756fe923
|
|
| BLAKE2b-256 |
09ce17c77b6d99573cad6790f79e7950da0c12309667932f782fc96c45e6f1de
|
File details
Details for the file pyhiv_tools-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pyhiv_tools-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73c364935bce410c52cfdda96ccb6fa9af26d77992f22d07f7a3d0165e1aae38
|
|
| MD5 |
21c46b4c05094615ac5c7142df09bc17
|
|
| BLAKE2b-256 |
dc9335b2f242ea00bf9664decb4006afd9d3ed6ead46a953dc8932bf26a110e1
|