Skip to content

PEFF databases: header keys as variant, site and chain claims - #178

Merged
ypriverol merged 1 commit into
mainfrom
feat/peff
Oct 19, 2026
Merged

ypriverol merged 1 commit into
mainfrom
feat/peff

Conversation

@ypriverol

Copy link
Copy Markdown
Contributor

Stacked on #177.

Adds PSI Extended FASTA Format (PEFF) databases as a third source of claims, after UniProt XML and annotation files. All three go through the same checks and entry builder.

Change

  • --database x.peff (or .peff.gz) is read as PEFF. Each entry becomes a reference protein; \PName is its description, and the header's first token (sp:P04637) its accession.

  • Header keys become claims, the same claims an annotation-file row holds, checked and built the same way (knockoffs included):

    Key Becomes
    \VariantSimple a one-residue substitution
    \VariantComplex an edit; an empty sequence is a deletion
    \ModResUnimod a site, with the mass of its UniMod accession
    \ModRes, \ModResPsi a site, when the name is in UniProt's modification vocabulary
    \Processed a mature chain; signal, transit and propeptides and initiator Met are left out
  • Left out and counted in the run log: sites with no known mass, and processed spans that are not mature chains. Malformed values are errors.

  • Family: a PEFF accession's primary accession (sp:P04637 → P04637) names the family, as the middle field of a UniProt accession does. Knockoffs are seeded the same way, so the same variant gets the same knockoffs from any source.

  • Annotation ids: an id now names one claim of its reference, not one across the whole database. A PEFF tag like VAR_A7H repeats legitimately across proteins.

Tests

  • End to end: BSA written as PEFF, with its curated variant as \VariantSimple, gives the same PIN rows as the UniProt XML search, up to accession spelling.
  • Unit: every key, including signal-peptide and unknown-mass handling; malformed values; an empty accession; a variant that does not fit its sequence.
  • Clippy is clean, and the input, model, output, search and andes test suites pass.

@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing

@coderabbitai

coderabbitai Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f26dbb16-1689-40d8-be18-66562156f1b0
📥 Commits

Reviewing files that changed from the base of the PR and between 430211d and 7aef719.

📒 Files selected for processing: 9
  • DOCS.md
  • README.md
  • crates/andes/src/bin/andes/search.rs
  • crates/andes/tests/annotations.rs
  • crates/input/src/annotation.rs
  • crates/input/src/annotations_file.rs
  • crates/input/src/database.rs
  • crates/input/src/lib.rs
  • crates/input/src/peff.rs
+------------------+
| Zero bugs given. |
+------------------+
  \
   \     /)/)
        ( '')
        /  |
      o(___)
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ypriverol
ypriverol added this pull request to stack #179 October 18, 2026 16:33
Base automatically changed from feat/annotations to main October 19, 2026 05:36
--database x.peff[.gz] reads a PSI Extended FASTA file. \VariantSimple,
\VariantComplex, \ModResUnimod, \ModRes, \ModResPsi and \Processed become
claims about the entry, checked and built through the annotation-file path
(knockoffs included); sites with no known mass and processed spans that are
not mature chains are counted and left out. A PEFF accession's primary
accession (sp:P04637 -> P04637) names the family, and an annotation id now
names one claim of its reference rather than one across the database.
@ypriverol
ypriverol merged commit 57d2d8f into main Oct 19, 2026
4 of 5 checks passed
@ypriverol
ypriverol deleted the feat/peff branch November 4, 2026 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant