Skip to content

Comments

Update/export scored report#162

Merged
singjc merged 2 commits intoPyProphet:masterfrom
singjc:update/export_scored_report
Oct 9, 2025
Merged

Update/export scored report#162
singjc merged 2 commits intoPyProphet:masterfrom
singjc:update/export_scored_report

Conversation

@singjc
Copy link
Contributor

@singjc singjc commented Oct 9, 2025

This pull request refactors and improves the export of scored reports in PyProphet, making the process more robust, modular, and efficient for both OSW (SQLite) and Parquet input formats. The main change is the introduction of specialized minimal readers for the scored report export, which handle missing columns/tables gracefully and unify the logic for both file types. Additional improvements include code cleanup, error handling, and improved filtering for IPF Q-values.

Export scored report refactor and improvements

  • Added specialized minimal readers for scored report export in both OSW (SQLite) and Parquet readers, ensuring only the necessary columns are selected and missing data is handled gracefully. (pyprophet/io/export/osw.py, pyprophet/io/export/parquet.py) [1] [2]
  • Refactored export_scored_report to use the new reader dispatch mechanism, removing manual column selection and improving robustness for different input types. (pyprophet/export/export_report.py)

Robustness and error handling

  • The new OSW scored report reader builds SQL queries that tolerate missing tables by emitting NULL columns, and attempts to create indexes but ignores failures gracefully. (pyprophet/io/export/osw.py)
  • Improved NotImplementedError messages for unsupported export formats. (pyprophet/io/export/osw.py, pyprophet/io/export/parquet.py) [1] [2]

Filtering and reporting improvements

  • Improved filtering for IPF Q-values in reporting functions to only apply the filter when the column exists and has non-null values. (pyprophet/report.py) [1] [2]

Code cleanup and formatting

  • Cleaned up and reformatted code for readability, including consistent use of double quotes and improved logging/debugging statements. (pyprophet/io/export/osw.py) [1] [2] [3] [4] [5] [6]
  • Updated imports and removed unused variables in export modules. (pyprophet/export/export_report.py)

@singjc singjc merged commit 120975c into PyProphet:master Oct 9, 2025
1 check passed
@singjc singjc deleted the update/export_scored_report branch October 9, 2025 16:41
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 this pull request may close these issues.

1 participant