Skip to content

Add exclude_decoys option and filtering in BaseWriter#209

Merged
singjc merged 3 commits intoPyProphet:masterfrom
singjc:master
May 6, 2026
Merged

Add exclude_decoys option and filtering in BaseWriter#209
singjc merged 3 commits intoPyProphet:masterfrom
singjc:master

Conversation

@singjc
Copy link
Copy Markdown
Contributor

@singjc singjc commented May 6, 2026

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:

  • Added an exclude_decoys boolean option to the ExportIOConfig class in pyprophet/_config.py to control whether decoy entries are excluded during TSV/matrix export.

CLI enhancements:

  • Introduced --exclude-decoys/--no-exclude-decoys flags to both the export_tsv and export_matrix commands in pyprophet/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:

  • Updated export_results and export_quant_matrix methods in pyprophet/io/_base.py to filter out decoy entries from the exported data if exclude_decoys is enabled, and added logging to report the number of excluded decoys. [1] [2]

Copilot AI review requested due to automatic review settings May 6, 2026 01:19
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_decoys to ExportIOConfig and plumbed it through export tsv / export matrix CLI flags.
  • Implemented decoy row filtering in BaseWriter.export_results and BaseWriter.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.

Comment thread pyprophet/cli/export.py
Comment thread pyprophet/cli/export.py
Comment thread pyprophet/io/_base.py Outdated
Comment thread pyprophet/io/_base.py
Comment thread pyprophet/_config.py
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@singjc singjc enabled auto-merge May 6, 2026 01:28
@singjc singjc merged commit 5f0a83e into PyProphet:master May 6, 2026
1 check passed
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.

2 participants