You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
qannotate previously enforced a single -mode per run, requiring repeated load/annotate/write cycles for multi-step annotation workflows. This change allows multiple modes to be specified and executed sequentially in one CLI invocation while preserving existing single-mode behavior.
CLI parsing: multi-mode support
Options captures all provided --mode values (getModes()), while retaining getMode() (first mode) for compatibility.
Mode-specific argument registration (eg. -d, --config, --summaryFile, --test/--control) is enabled when any selected mode requires it.
Execution flow: chained per-mode runs
Main now branches on options.getModes():
single mode: unchanged path
multiple modes: execute modes in order, piping intermediate output through temp VCFs and writing final output once
Added explicit guard to reject multi-mode runs containing vcf2maf/vcf2maftmp in mixed pipelines.
Per-mode database assignment in multi-mode runs
Multi-mode execution now extracts all -d/--database arguments once and assigns them in order to only the modes that require a database.
Modes that do not require a database do not consume a -d.
Supports -d value, -d=value, and --database=value forms when collecting database arguments.
Focused tests
Added OptionsTest.multipleModes() to verify ordered multi-mode parsing and backward-compatible primary mode behavior.
Added/updated MainTest coverage for:
per-mode argument rewriting with explicit per-mode database inputs
Bug fix (non-breaking change which fixes an issue)
New feature (non-breaking change which adds functionality)
Breaking change (fix or feature that would cause existing functionality to not work as expected)
This change requires a documentation update
How Has This Been Tested?
Targeted qannotate unit tests were run for multi-mode parsing, per-mode argument rewriting, and database argument handling.
au.edu.qimr.qannotate.OptionsTest
au.edu.qimr.qannotate.MainTest
Are WDL Updates Required?
No WDL updates required; change is isolated to qannotate CLI option parsing/execution flow.
Checklist:
My code follows the style guidelines of this project
I have performed a self-review of my own code
I have commented my code, particularly in hard-to-understand areas
I have made corresponding changes to the documentation
My changes generate no new warnings
I have added tests that prove my fix is effective or that my feature works
New and existing unit tests pass locally with my changes
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
CopilotAI
changed the title
[WIP] Refactor qannotate to support multiple modes simultaneously
Refactor qannotate to support multi-mode execution in a single invocation
Feb 25, 2026
@copilot will the order of modes that is provided by the user be maintained when running them?
Yes — mode order is maintained. Options stores modes in the same order they are supplied on the CLI (options.valuesOf("mode")), and Main.runMultipleModes(...) iterates that list in index order, executing each mode sequentially in that same order.
@copilot each mode will potentially have its own -d database file that will be required. Not all modes need this
Updated in 52dc3ad: multi-mode execution now extracts all -d/--database args once and assigns them per mode in order, only to modes that use a database. This allows different database files across modes (with non-database modes not consuming a -d).
CopilotAI
changed the title
Refactor qannotate to support multi-mode execution in a single invocation
Refactor qannotate to support multi-mode execution with per-mode database assignment
Feb 25, 2026
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
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.
Description
qannotate previously enforced a single
-modeper run, requiring repeated load/annotate/write cycles for multi-step annotation workflows. This change allows multiple modes to be specified and executed sequentially in one CLI invocation while preserving existing single-mode behavior.CLI parsing: multi-mode support
Optionscaptures all provided--modevalues (getModes()), while retaininggetMode()(first mode) for compatibility.-d,--config,--summaryFile,--test/--control) is enabled when any selected mode requires it.Execution flow: chained per-mode runs
Mainnow branches onoptions.getModes():vcf2maf/vcf2maftmpin mixed pipelines.Per-mode database assignment in multi-mode runs
-d/--databasearguments once and assigns them in order to only the modes that require a database.-d.-d value,-d=value, and--database=valueforms when collecting database arguments.Focused tests
OptionsTest.multipleModes()to verify ordered multi-mode parsing and backward-compatible primary mode behavior.MainTestcoverage for:Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Targeted qannotate unit tests were run for multi-mode parsing, per-mode argument rewriting, and database argument handling.
au.edu.qimr.qannotate.OptionsTestau.edu.qimr.qannotate.MainTestAre WDL Updates Required?
No WDL updates required; change is isolated to qannotate CLI option parsing/execution flow.
Checklist:
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.