Add/im boundaries to tsv export #175
Merged
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.
This pull request improves the robustness and maintainability of the OSW file reading logic in
pyprophet/io/export/osw.pyby centralizing and standardizing how ion mobility (IM) columns are handled. The main changes ensure that the code gracefully supports both older and newer OSW files, regardless of whether specific IM columns are present, and reduces code duplication by introducing helper methods.Ion Mobility (IM) column handling improvements:
_has_im_boundariesand_has_imto centralize checks for the presence of IM-related columns (EXP_IM,EXP_IM_LEFTWIDTH,EXP_IM_RIGHTWIDTH) in theFEATUREtable, improving code clarity and maintainability._read_unscored_data,_read_peptidoform_data,_read_augmented_data,_read_standard_data) to dynamically include IM columns or NULLs based on their presence, using the new helper methods. This ensures compatibility with both legacy and current OSW files. [1] [2] [3] [4] [5] [6] [7]Code organization and imports:
osw.py, removing unused imports and grouping related functionality for better readability.