Skip to content

Corrected ranking in caprieval for reverse sorting - Issue #1621#1622

Merged
amjjbonvin merged 2 commits into
mainfrom
capri-ranking
Jul 13, 2026
Merged

Corrected ranking in caprieval for reverse sorting - Issue #1621#1622
amjjbonvin merged 2 commits into
mainfrom
capri-ranking

Conversation

@amjjbonvin

Copy link
Copy Markdown
Member

What does this PR do and why?

Corrected libcapri.py so that when sort_ascending=false the caprieval_rank reported in capri_ss.tsv match the actually sorting of the file

Added a test for this.

How was this tested?

By running a test example from the docking-protein-protein example, adding sort_ascending=false to a caprieval module and check that the caprieval_ranks are matching the sort order.

AI assistance

AI was used to add the test

Checklist

  • Tests cover the new and/or changed code
  • Documentation updated if needed (also in the haddock3 user-manual
  • CHANGELOG.md updated for user-facing changes

Related issues

#1621

Notes for reviewers

Note that the reranking is only affecting the single structure analysis reported in capri_ss.tsv

Better not to change the reported cluster_rank in the capri_clt.tsv file as this rank corresponds to the cluster naming. In this case, the reverse sorting should be enabled directly in the seletopclust module (see issue #1620)

@amjjbonvin amjjbonvin self-assigned this Jul 10, 2026
@amjjbonvin amjjbonvin added bug Something isn't working m|caprieval Improvements in caprieval module labels Jul 10, 2026

@AnnaKravchenko AnnaKravchenko left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sorting is working as expected now - checked for 'score' and ‘fnat’ metrics, both in caprieval and caprifilter.

Also, I found out this bug was introduced by me while moving the sorting function from capri.py to libcapri.py:( Nice it was spotted and resolved quickly!

@amjjbonvin
amjjbonvin merged commit 7ad1148 into main Jul 13, 2026
9 checks passed
@amjjbonvin
amjjbonvin deleted the capri-ranking branch July 13, 2026 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working m|caprieval Improvements in caprieval module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants