Skip to content

fix parsing pepxml with none of the standard scores#148

Open
paretje wants to merge 1 commit into
mainfrom
hotfix/pepxml
Open

fix parsing pepxml with none of the standard scores#148
paretje wants to merge 1 commit into
mainfrom
hotfix/pepxml

Conversation

@paretje
Copy link
Copy Markdown
Contributor

@paretje paretje commented Jun 2, 2026

If nothing was found, we return the first element as fallback. However, dict_keys isn't subscriptable, resulting in issue CompOmics/ms2rescore#258 when none of the standard search engine scores were found. Making this a list fixes this.

However, if the order isn't significant (the order of the keys will be the order of insertion in current (C?)Python implementations, the order of the set would de-facto be according to the order of the hashes) we could also use a set here, and then use score_keys.pop() as fallback instead of score_keys[0].

If nothing was found, we return the first element as fallback. However,
score_keys isn't subscriptable, resulting in issue #258 when none of the
standard search engine scores were found. Making this a list fixes this.

However, if the order isn't significant (the order of the keys will
be the order of insertion in current (C?)Python implementations, the
order of the set would de-facto be according to the order of the hashes)
we could also use a set here, and then use `score_keys.pop()` as
fallback instead of `score_keys[0]`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant