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.1

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.1
File Size Uploaded
apb_fasta-0.1.1.tar.gz 13.0 kB Details

Built distribution (wheel)

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

Total release size: 30.1 kB

Release files / apb_fasta-0.1.1.tar.gz

Download URL apb_fasta-0.1.1.tar.gz
Size 13.0 kB
Tags Source
SHA-256 checksum
How to use checksums
612040820b6ac2d967d4d921a5a36f8ac1e52ce2f72b2ee7dd92e88fb7228c10
BLAKE2b-256 checksum
How to use checksums
3eed99415b6b71dc40fd681b8a7bef938bcb2885acc37144640919d5ee93aa4a
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.1-py3-none-any.whl

Download URL apb_fasta-0.1.1-py3-none-any.whl
Size 17.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ccc76ebab7440421749ecf34929684c006c539dd4b60a1194e5b3b51cfb3b2e6
BLAKE2b-256 checksum
How to use checksums
6485e7ce1d80daa79e871819095ccf3360bb8b800542ac5182301717d8a6393a
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

This release

0.1.1 This release

2 release files

0.1.0

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