Skip to content

Commit

Permalink
feat: add "sort-and-run" subcommand
Browse files Browse the repository at this point in the history
wip
  • Loading branch information
ivan-aksamentov committed Apr 18, 2024
1 parent 956aaf0 commit d7728c0
Show file tree
Hide file tree
Showing 11 changed files with 622 additions and 24 deletions.
33 changes: 14 additions & 19 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ console_error_panic_hook = "=0.1.7"
criterion = { version = "=0.5.1", features = ["html_reports"] }
crossbeam = "=0.8.2"
crossbeam-channel = "=0.5.8"
crossbeam-skiplist = "=0.1.3"
csv = "=1.2.2"
ctor = "=0.2.2"
derive_more = "=0.99.17"
Expand Down
1 change: 1 addition & 0 deletions packages/nextclade-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ color-eyre = { workspace = true }
comfy-table = { workspace = true }
crossbeam = { workspace = true }
crossbeam-channel = { workspace = true }
crossbeam-skiplist = { workspace = true }
ctor = { workspace = true }
dotenv = { workspace = true }
dotenv_codegen = { workspace = true }
Expand Down
1 change: 1 addition & 0 deletions packages/nextclade-cli/src/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ pub mod nextclade_dataset_list;
pub mod nextclade_loop;
pub mod nextclade_ordered_writer;
pub mod nextclade_read_annotation;
pub mod nextclade_run_sort_and_analysis;
pub mod nextclade_seq_sort;
pub mod print_help_markdown;
pub mod verbosity;
6 changes: 5 additions & 1 deletion packages/nextclade-cli/src/cli/nextclade_cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use crate::cli::nextclade_dataset_get::nextclade_dataset_get;
use crate::cli::nextclade_dataset_list::nextclade_dataset_list;
use crate::cli::nextclade_loop::nextclade_run;
use crate::cli::nextclade_read_annotation::nextclade_read_annotation;
use crate::cli::nextclade_run_sort_and_analysis::nextclade_run_sort_and_analysis;
use crate::cli::nextclade_seq_sort::nextclade_seq_sort;
use crate::cli::print_help_markdown::print_help_markdown;
use crate::cli::verbosity::Verbosity;
Expand Down Expand Up @@ -95,6 +96,8 @@ pub enum NextcladeCommands {
/// For short help type: `nextclade -h`, for extended help type: `nextclade --help`. Each subcommand has its own help, for example: `nextclade sort --help`.
Sort(Box<NextcladeSortArgs>),

SortAndRun(Box<NextcladeSortArgs>),

/// Read genome annotation and present it in Nextclade's internal formats. This is mostly only useful for Nextclade maintainers and the most curious users. Note that these internal formats have no stability guarantees and can be changed at any time without notice.
///
/// For short help type: `nextclade -h`, for extended help type: `nextclade --help`. Each subcommand has its own help, for example: `nextclade sort --help`.
Expand Down Expand Up @@ -442,7 +445,7 @@ pub struct NextcladeRunInputArgs {
}

#[allow(clippy::struct_excessive_bools)]
#[derive(Parser, Debug, Clone)]
#[derive(Parser, Debug, Clone, Default)]
pub struct NextcladeRunOutputArgs {
/// REMOVED. Use `--output-all` instead
#[clap(long)]
Expand Down Expand Up @@ -1128,6 +1131,7 @@ pub fn nextclade_parse_cli_args() -> Result<(), Report> {
}
},
NextcladeCommands::Sort(seq_sort_args) => nextclade_seq_sort(&seq_sort_args),
NextcladeCommands::SortAndRun(args) => nextclade_run_sort_and_analysis(&args),
NextcladeCommands::ReadAnnotation(read_annotation_args) => nextclade_read_annotation(&read_annotation_args),
}
}
1 change: 1 addition & 0 deletions packages/nextclade-cli/src/cli/nextclade_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ use nextclade::tree::tree_builder::graph_attach_new_nodes_in_place;
use nextclade::types::outputs::NextcladeOutputs;
use nextclade::utils::option::OptionMapRefFallible;

#[derive(Debug)]
pub struct NextcladeRecord {
pub index: usize,
pub seq_name: String,
Expand Down
Loading

0 comments on commit d7728c0

Please sign in to comment.