Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating metaValues of PeptideHits with numpy objects crashes in idxml writer #60

Closed
jonasscheid opened this issue Oct 29, 2023 · 0 comments · Fixed by #61
Closed

Updating metaValues of PeptideHits with numpy objects crashes in idxml writer #60

jonasscheid opened this issue Oct 29, 2023 · 0 comments · Fixed by #61

Comments

@jonasscheid
Copy link
Contributor

jonasscheid commented Oct 29, 2023

After rescoring with ms2rescore the rescoring_features values can contain various types:

{<class 'numpy.int8'>, <class 'float'>, <class 'numpy.float32'>, <class 'numpy.float64'>, <class 'int'>, <class 'numpy.int64'>}

PeptideHit.setMetaValues however, does only allow in_1: int | float | bytes | str | List[int] | List[float] | List[bytes] as values. This then causes errors when writing / updating idXML files.

I suggest converting to float if value is not type str

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 a pull request may close this issue.

1 participant