Skip to main content

apb-fasta

FASTA verification and protein annotation for APB2 results.

Online documentation or its source index.

The first release exposes two independent operations:

  • verify that APB2's modification-stripped peptide sequences occur in the supplied FASTA database;
  • merge FASTA annotations for every reported protein-group member without collapsing the group to its leading accession.

Protein inference with Prozor is the planned third operation. It will remain explicit and opt-in.

Installation

APB FASTA requires Python 3.13 or later.

pip install apb-fasta

Python API

Read the FASTA files once and load the APB2 result:

from pathlib import Path

from apb2.api import read_parsed_levels, write_parsed_levels
from apb_fasta.api import FastaAnnotator

annotator = FastaAnnotator.read((Path("human.fasta"), Path("contaminants.fasta")))
parsed = read_parsed_levels(Path("input.h5mu"))

Verify peptides only:

verified = annotator.verify_peptides(parsed)
print(verified.reports.peptide_levels)
write_parsed_levels(verified.parsed, Path("verified.h5mu"))

Merge protein annotations only:

annotated = annotator.merge_annotations(parsed)
print(annotated.reports.protein_groups)
write_parsed_levels(annotated.parsed, Path("annotated.h5mu"))

Apply both operations in memory:

complete = annotator.annotate(parsed)
write_parsed_levels(complete.parsed, Path("complete.h5mu"))

The operations can also be chained explicitly without an intermediate file:

verified = annotator.verify_peptides(parsed)
complete = annotator.merge_annotations(verified.parsed)

The annotator validates and binds the reusable protein frame once. Every method accepts one canonical ParsedLevels value and returns an immutable FastaAnnotationResult containing its replacement plus typed operation reports. apb_fasta neither opens result files nor receives raw AnnData or MuData objects.

CLI

Verify peptides only:

apb-fasta verify-peptides input.h5mu human.fasta contaminants.fasta --output verified.h5mu

Merge protein annotations only:

apb-fasta merge-annotations input.h5mu human.fasta contaminants.fasta --output annotated.h5mu

Apply both operations together:

apb-fasta run input.h5mu human.fasta contaminants.fasta --output complete.h5mu

Peptide verification adds feature-aligned varm["fasta_validation"] tables. Protein annotation adds protein-aligned varm["fasta"], the lossless fasta_protein_group_members annotation table, and its directed relation to the protein axis.

Metadata

Release files for apb-fasta 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for apb-fasta 0.1.0
File Size Uploaded
apb_fasta-0.1.0.tar.gz 13.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for apb-fasta 0.1.0
File Interpreter ABI Platform
apb_fasta-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 30.1 kB

Release files / apb_fasta-0.1.0.tar.gz

Download URL apb_fasta-0.1.0.tar.gz
Size 13.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d3b8cdc09cb711f8cdf407796f84d5711ca0b3ae01b73f80e8cc8404b810ff02
BLAKE2b-256 checksum
How to use checksums
390a9f0c7c858c912c8e157edfab2430d51eaf2e7405ea97859ae07d5ae6f5e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.

Transparency log

Release files / apb_fasta-0.1.0-py3-none-any.whl

Download URL apb_fasta-0.1.0-py3-none-any.whl
Size 17.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7f1a3e3764387e31750d0b0ec93f7dbf179c27a0ac959ff4f9699c0dd358a8f4
BLAKE2b-256 checksum
How to use checksums
5b4597f2eeae3702269601c767a43e626b6f6c043eea16cdb06641dea4271ef5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.1

2 release files

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page