Skip to content

Conversation

@Lilferrit
Copy link
Contributor

Fixed a bug where when detokenizing a peptide sequence in reverse mode the entire string is reversed, leading to incorrect behavior for multi-character residues. For example the sequence K[Oxidation]MARRAYLK gets detokenized as K]noitadixO[MARRAYLK.

Copy link
Owner

@wfondrie wfondrie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. Please add a unit test and it should be good to go!

@Lilferrit
Copy link
Contributor Author

Sounds good, I added a test.

@codecov
Copy link

codecov bot commented Nov 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.62%. Comparing base (3938944) to head (406ab22).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #72      +/-   ##
==========================================
- Coverage   96.71%   96.62%   -0.10%     
==========================================
  Files          24       24              
  Lines        1004     1006       +2     
==========================================
+ Hits          971      972       +1     
- Misses         33       34       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Lilferrit Lilferrit requested a review from wfondrie November 7, 2025 23:25
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.

Error in reversing peptides with PeptideTokenizer.detokenize

2 participants