Feature: add exporting "score_peptide" and "score_protein" from .osw#159
Merged
singjc merged 4 commits intoPyProphet:masterfrom Aug 22, 2025
Merged
Feature: add exporting "score_peptide" and "score_protein" from .osw#159singjc merged 4 commits intoPyProphet:masterfrom
singjc merged 4 commits intoPyProphet:masterfrom
Conversation
singjc
approved these changes
Aug 22, 2025
Contributor
singjc
left a comment
There was a problem hiding this comment.
Thanks for adding! I just made a minor suggestion which you can commit, for snakecase syntax. Just double check in case I missed one, we can the merge afterwards.
pyprophet/io/export/osw.py
Outdated
|
|
||
| # Non-global contexts pivot query | ||
| if pivot_cols_str: # Only if there are non-global contexts | ||
| nonGlobal_query = f""" |
Contributor
There was a problem hiding this comment.
Suggested change
| nonGlobal_query = f""" | |
| non_global_query = f""" |
Convert to snakecase for consistency.
pyprophet/io/export/osw.py
Outdated
| """ | ||
| else: | ||
| # If no non-global contexts, create empty result with same structure | ||
| nonGlobal_query = f""" |
Contributor
There was a problem hiding this comment.
Suggested change
| nonGlobal_query = f""" | |
| non_global_query = f""" |
pyprophet/io/export/osw.py
Outdated
| g.{score_table}_GLOBAL_PVALUE, | ||
| g.{score_table}_GLOBAL_QVALUE, | ||
| g.{score_table}_GLOBAL_PEP | ||
| FROM ({nonGlobal_query}) ng |
Contributor
There was a problem hiding this comment.
Suggested change
| FROM ({nonGlobal_query}) ng | |
| FROM ({non_global_query}) ng |
pyprophet/io/export/osw.py
Outdated
| """ | ||
| elif pivot_cols_str and not global_exists: | ||
| # Only non-global contexts exist | ||
| merged_query = nonGlobal_query |
Contributor
There was a problem hiding this comment.
Suggested change
| merged_query = nonGlobal_query | |
| merged_query = non_global_query |
change to snakecase syntax
Contributor
Author
|
Thanks for the quick review, addressed the comments (you did not miss any cases) so I think it is ready to merge. |
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.
Currently exporting .osw to .oswpq does not include protein and peptide scores/pep/qvalues. This functionality is important when have a pre-analyzed .osw files that we want to convert to .oswpq for easier data access (e.g. in massdash)
This was tested with the test.osw file in massdash (file path
/test/test_data/example_dia/openswath/osw) and seems to yield expected results.