-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cli): add cli params for minimizer search algo
- Loading branch information
1 parent
d327c77
commit 8940bbb
Showing
6 changed files
with
49 additions
and
13 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
pub mod minimizer_index; | ||
pub mod minimizer_search; | ||
pub mod params; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
use clap::Parser; | ||
use schemars::JsonSchema; | ||
use serde::{Deserialize, Serialize}; | ||
|
||
#[allow(clippy::struct_excessive_bools)] | ||
#[derive(Parser, Debug, Clone, Serialize, Deserialize, JsonSchema)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct NextcladeSeqSortParams { | ||
/// Minimum value of the normalized index hit being considered for assignment | ||
#[clap(long)] | ||
#[clap(default_value_t = NextcladeSeqSortParams::default().min_normalized_hit)] | ||
pub min_normalized_hit: f64, | ||
|
||
/// Minimum number of the index hits required for assignment | ||
#[clap(long)] | ||
#[clap(default_value_t = NextcladeSeqSortParams::default().min_total_hits)] | ||
pub min_total_hits: u64, | ||
} | ||
|
||
#[allow(clippy::derivable_impls)] | ||
impl Default for NextcladeSeqSortParams { | ||
fn default() -> Self { | ||
Self { | ||
min_normalized_hit: 0.3, | ||
min_total_hits: 10, | ||
} | ||
} | ||
} |