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.3.tar.gz (20.3 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.3-py3-none-any.whl (22.3 kB view details)

Uploaded Python 3

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

Hashes for flua-0.0.3.tar.gz
Algorithm Hash digest
SHA256 5e59f1002afb80ae29bd287cff9093932ee97437d3172d7656a44cbf6422a909
MD5 44aa517a42273c4ed42475e56c5f551a
BLAKE2b-256 2f21e8b5ea21a1586e507c1f73d12dc184c12d50f85fb8c956c77d372b09d021

See more details on using hashes here.

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

Hashes for flua-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c2567d3f81a4ca986e4e2dc33423bc04781a29a7797b5422116a48d661d3ca58
MD5 6e9835931f03fdbe5120441f909a0644
BLAKE2b-256 ecf2609c235e97a1b09e6d8a735f9a0f398999288987f97d68c59a7585105f3d

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