A library for structured flu sequence analysis
Project description
flua
Note: This project is under active development. APIs may change without notice.
Influenza A sequence analysis toolkit.
Features
- Load and parse influenza A FASTA files (file path or string input)
- GISAID multi-segment FASTA support
- Automatic sequence type detection (DNA / RNA / Protein)
- Subtype extraction from FASTA headers (e.g. H1N1, H5N1pdm09)
- Segment identification (PB2, PB1, PA, HA, NP, NA, MP, NS)
- Translation with alternative product generation (splicing, frameshift, alt-ORF)
- DataFrame export for multi-sample comparative analysis
Installation
pip install flua
Usage
from flua import load_fasta, load_multiple_fasta, load_gisaid_fasta, groups_to_dataframe
# Load a single FASTA file
group = load_fasta("sample.fasta")
print(group.subtype) # e.g. "H1N1"
# Load from a FASTA-formatted string
group = load_fasta_string(fasta_text)
# Load a GISAID multi-segment FASTA
group = load_gisaid_fasta("gisaid_sample.fasta")
# Load multiple files and export to DataFrame
groups = load_multiple_fasta(["sample1.fasta", "sample2.fasta"])
df = groups_to_dataframe(groups, value_type="translated")
Development
pip install -e ".[dev]"
pytest
ruff check src/ tests/
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
flua-0.0.3.tar.gz
(20.3 kB
view details)
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
flua-0.0.3-py3-none-any.whl
(22.3 kB
view details)
File details
Details for the file flua-0.0.3.tar.gz.
File metadata
- Download URL: flua-0.0.3.tar.gz
- Upload date:
- Size: 20.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e59f1002afb80ae29bd287cff9093932ee97437d3172d7656a44cbf6422a909
|
|
| MD5 |
44aa517a42273c4ed42475e56c5f551a
|
|
| BLAKE2b-256 |
2f21e8b5ea21a1586e507c1f73d12dc184c12d50f85fb8c956c77d372b09d021
|
File details
Details for the file flua-0.0.3-py3-none-any.whl.
File metadata
- Download URL: flua-0.0.3-py3-none-any.whl
- Upload date:
- Size: 22.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2567d3f81a4ca986e4e2dc33423bc04781a29a7797b5422116a48d661d3ca58
|
|
| MD5 |
6e9835931f03fdbe5120441f909a0644
|
|
| BLAKE2b-256 |
ecf2609c235e97a1b09e6d8a735f9a0f398999288987f97d68c59a7585105f3d
|