This pull request introduces a new "wizard mode" to the application, enabling users to interactively generate plots through a guided CLI interface. It also includes utility enhancements and modifications to the main application logic to support this feature. Below are the most significant changes:
Wizard Mode Implementation:
Added a new module wizard with the wizard_mode function, which provides an interactive CLI for users to select BAM/FASTA files, specify regions, and configure plot settings. It utilizes the inquire library for prompts.
Integrated wizard_mode into the main function in src/main.rs, allowing the application to detect when no arguments are passed and switch to wizard mode.
Dependency Updates:
Added the inquire crate (version 0.7.5) to Cargo.toml to enable interactive CLI prompts.
Enhancements to Plot Output:
Updated the main function to save plot outputs (HTML or Vega-Lite JSON) with filenames derived from the input BAM file when using wizard mode. This ensures clear output file naming. [1][2]
Utility Functions:
Introduced a new utility function get_fasta_contigs in src/utils.rs to extract contig/chromosome names from a FASTA file, which is used in wizard mode for user selection.
Added a unit test for get_fasta_contigs to validate its functionality.
Codebase Modifications:
Updated imports in src/main.rs and src/utils.rs to include the new wizard module and utility function. [1][2]
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.
This pull request introduces a new "wizard mode" to the application, enabling users to interactively generate plots through a guided CLI interface. It also includes utility enhancements and modifications to the main application logic to support this feature. Below are the most significant changes:
Wizard Mode Implementation:
Dependency Updates:
Enhancements to Plot Output:
Utility Functions:
Codebase Modifications: