Repository navigation
UniPEFF: write isoform-scoped features to their isoform entries - #10340
Merged
Merged
Conversation
…elds clang warned about all three (-Wunused-function, -Wunused-private-field): isEmpty() in UniProtXMLHandler.cpp and UniProtXMLHandler's gene_name_is_primary_ / organism_name_is_scientific_ had no users. Removing isEmpty() also puts the UTF-16 conversion comment back above xmlchToString(), the function it describes. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015br53P8rFQMnErUa4SiMSX
A UniProt feature whose <location sequence="..."> names an isoform carries that isoform's coordinates. #10266 stopped applying such features to the canonical entry; since #9966 the isoform is usually written as an entry of its own, so the features now go there: - prepareEntry() reconstructs the isoforms first and routes each feature to the canonical entry (no location/@sequence, or the "displayed" isoform) or to the entry of the isoform it names. Features of isoforms that are not written (external, not described, not reconstructable, -omit_isoforms) are still skipped and counted. - Isoform annotations go through the same steps as canonical ones against the isoform sequence: half-cystine merge, disulfide range check, and Option B ids or default-mode disulfide labels. writeAnnotationTags(), split out of writePeffEntry(), writes them for both kinds of entry. An isoform entry with ids also sets HasAnnotationIdentifiers. - The summary reports the features written to isoform entries and those not applied. New TOPP_UniPEFF_15/_16/_17 (default, -annotation_identifiers, -omit_isoforms) and two summary checks run on UniPEFF_5_input_isoform_features.xml; the expected outputs were written by hand. TOPP_UniPEFF_12_summary keeps its counts under the new wording. On human Swiss-Prot, all 1,228 such features (442 entries) land on their isoform entries at the positions UniProt gives. Canonical entries, isoform sequences and the -omit_isoforms output are byte-identical to before. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015br53P8rFQMnErUa4SiMSX
Contributor
|
Warning Review limit reachedNext included review available in 6 minutes. View limit detailsLimit details: You’ve used all 4 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (9)
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. Comment |
4 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Follow-up to #9966 and #10266. A UniProt feature whose
<location sequence="...">names an isoform carries that isoform's coordinates. #10266 stopped applying such features to the canonical entry, and since #9966 the isoform is usually written as an entry of its own, so these features now go to that entry:prepareEntry()reconstructs the isoforms first, then sends each feature to the canonical entry (nolocation/@sequence, or the "displayed" isoform) or to the entry of the isoform it names. Features of isoforms that aren't written (external, not described, not reconstructable,-omit_isoforms) are still skipped and counted.writeAnnotationTags(), split out ofwritePeffEntry(), writes them for both kinds of entry. An isoform entry with ids also setsHasAnnotationIdentifiers.Example from the new fixture: P55555-2 is the 30-residue canonical sequence with A10 replaced by ASCHSK. UniProt's phosphoserine at S11, disulfide bond C12–C30 and variant R33Q on that isoform now appear on its entry:
A second commit removes the unused
isEmpty()helper and two unusedUniProtXMLHandlerfields, which clang flagged (-Wunused-function,-Wunused-private-field).Tests
UniPEFF_5_input_isoform_features.xml, run byTOPP_UniPEFF_15(default),_16(-annotation_identifiers),_17(-omit_isoforms) and two summary checks. It covers features on a written isoform, on the displayed isoform (stays canonical), on an external and on an unreconstructable isoform (not applied), and a sequence conflict (never written, not counted). The expected outputs were written by hand; the tool's output matches them byte for byte.TOPP_UniPEFF_12_summarykeeps its counts (5 features, 2 entries) under the new wording. No other expected output changes, since no other fixture has scoped features on a written isoform.Local validation
On 3c9621c (develop ef94635 plus this PR), Debug build with clang 18.1.3 (Ubuntu 24.04, Ninja) against Ubuntu packages and Arrow/Parquet from Apache's apt repository:
ctest -R 'UniPEFF|UniProtXML': 40 passed, 0 failed (the 32 existing UniPEFF tests plus the 8 new ones). No compiler warnings in the UniPEFF sources.-omit_isoformsoutput are byte-identical to before.Checklist
🤖 Generated with Claude Code
https://claude.ai/code/session_015br53P8rFQMnErUa4SiMSX
Generated by Claude Code