Add exclude_decoys option and filtering in BaseWriter#209
Merged
singjc merged 3 commits intoPyProphet:masterfrom May 6, 2026
Merged
Add exclude_decoys option and filtering in BaseWriter#209singjc merged 3 commits intoPyProphet:masterfrom
singjc merged 3 commits intoPyProphet:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces an exclude_decoys option to control whether decoy entries are included in TSV and quantification matrix exports, wiring the setting through the CLI into ExportIOConfig and applying filtering in the base writer.
Changes:
- Added
exclude_decoystoExportIOConfigand plumbed it throughexport tsv/export matrixCLI flags. - Implemented decoy row filtering in
BaseWriter.export_resultsandBaseWriter.export_quant_matrix, with informational logging on exclusions. - Updated CLI help text and defaults for the new flags.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
pyprophet/io/_base.py |
Filters out decoy rows during TSV and matrix export when configured, with logging. |
pyprophet/cli/export.py |
Adds --exclude-decoys/--no-exclude-decoys flags and passes the option into export configuration. |
pyprophet/_config.py |
Adds exclude_decoys configuration field to ExportIOConfig. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.
This pull request adds a new option to exclude decoy entries from TSV and quantification matrix exports, making it easier for users to control whether decoys are included in their output. The change introduces new CLI flags, updates configuration handling, and ensures decoys are filtered out when requested, with clear logging for transparency.
New export options for decoy exclusion:
exclude_decoysboolean option to theExportIOConfigclass inpyprophet/_config.pyto control whether decoy entries are excluded during TSV/matrix export.CLI enhancements:
--exclude-decoys/--no-exclude-decoysflags to both theexport_tsvandexport_matrixcommands inpyprophet/cli/export.py, defaulting to excluding decoys. The option is passed through the CLI and into the export configuration. [1] [2] [3] [4] [5] [6]Export logic updates:
export_resultsandexport_quant_matrixmethods inpyprophet/io/_base.pyto filter out decoy entries from the exported data ifexclude_decoysis enabled, and added logging to report the number of excluded decoys. [1] [2]