apb-fasta
FASTA verification and protein annotation for APB2 results.
Online documentation or its source index.
The first release exposes three 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;
- add sequence-derived peptide properties to every peptide-derived level with
add_peptide_properties, which needs no FASTA database and is available from Python only.
Protein inference with Prozor is the planned fourth 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. Its coverage counts matched and unmatched targets apart from decoys, the rows apb2 marks apb_Decoy, which every checked level must carry. Protein-group annotation adds varm["fasta"] to every level declaring the fasta_accessions role, the protein level and peptide-derived levels alike, with a lossless member table and its directed relation to that level's axis.
Metadata
Release files for apb-fasta 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| apb_fasta-0.1.2.tar.gz | 17.4 kB | With provenance | Details for apb_fasta-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| apb_fasta-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for apb_fasta-0.1.2-py3-none-any.whl |
Total release size: 38.2 kB
Release files / apb_fasta-0.1.2.tar.gz
| Download URL | apb_fasta-0.1.2.tar.gz |
|---|---|
| Size | 17.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4c38b09c8a1998261cd0e050ef63f32902427592e48f6c74967079f6a32e7119
|
|
BLAKE2b-256 checksum How to use checksums |
b3ddbd41a5294737185cf2bf929e941d2b8cc83b2ac17e6cfe4a6c9829a2252a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 20, 2026.
Transparency logRelease files / apb_fasta-0.1.2-py3-none-any.whl
| Download URL | apb_fasta-0.1.2-py3-none-any.whl |
|---|---|
| Size | 20.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
db44ffd6efde85b3f9c0e6a7e369f4df05ab4ca63ffb8c09314c597990f8dd4b
|
|
BLAKE2b-256 checksum How to use checksums |
b135bf585160cfdf9a2df8bc3e658f19650ecf4aa7749560678c83a75c28f6cb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 20, 2026.
Transparency logSecurity for apb-fasta 0.1.2
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for apb_fasta-0.1.2.tar.gz
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 Nov 20, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.