Skip to main content

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


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.2.tar.gz (16.5 kB view details)

Uploaded Source

Built Distribution

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

flua-0.0.2-py3-none-any.whl (17.6 kB view details)

Uploaded Python 3

File details

Details for the file flua-0.0.2.tar.gz.

File metadata

  • Download URL: flua-0.0.2.tar.gz
  • Upload date:
  • Size: 16.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for flua-0.0.2.tar.gz
Algorithm Hash digest
SHA256 d4b444490c4c37c6bebc89a7d81eef0b8c90dc9b50cec2110eaff29c26deca86
MD5 ec6f638681ae7e213a73459364241de4
BLAKE2b-256 f5f04dbdcd1afae7232dded6e35dbf553b455094ebdc1722028a455bf66a3e6e

See more details on using hashes here.

File details

Details for the file flua-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: flua-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 17.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for flua-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0b09499c0e7b4f0d4ba884f7aa0e0c989281b30af23f12af5aa12f82842db2b6
MD5 41006ce5cdef04f257270a4408ee0966
BLAKE2b-256 77b4523b38f4eaedabf25acb3faf87c5c71d1104ca531338cc6f4674a0986325

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