-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: implement alignment param presets #1569
base: master
Are you sure you want to change the base?
Conversation
pub fn from_preset(preset_name: impl AsRef<str>) -> Result<AlignPairwiseParams, Report> { | ||
let preset_name = preset_name.as_ref(); | ||
match preset_name { | ||
"default" => Ok(AlignPairwiseParams::default()), | ||
"high-diversity" => Ok(AlignPairwiseParams { | ||
alignment_preset: o!("high-diversity"), | ||
penalty_gap_extend: 0, | ||
penalty_gap_open: 999999, // FIXME: dummy values | ||
penalty_gap_open_in_frame: 88888, // FIXME: dummy values | ||
penalty_gap_open_out_of_frame: 77777, // FIXME: dummy values | ||
penalty_mismatch: 6666, // FIXME: dummy values | ||
score_match: 33333, // FIXME: dummy values | ||
..AlignPairwiseParams::default() | ||
}), | ||
"short-sequences" => Ok(AlignPairwiseParams { | ||
alignment_preset: o!("short-sequences"), | ||
min_length: 0, // FIXME: dummy values | ||
..AlignPairwiseParams::default() | ||
}), | ||
_ => make_error!("Alignment params preset not found: {preset_name}"), | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The presets are defined here.
These are the dummy values to be tweaked.
/// Alignment param preset | ||
#[clap(long, default_value = ALIGNMENT_PRESET_DEFAULT)] | ||
pub alignment_preset: String, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CLI arg help text needs to be adjusted
Define some hard-coded presets of alignment parameters additionally to the default one. The `--alignment-preset` arg allows users to toggle between presets. Example: ```bash nextclade run --dataset-name=sars-cov-2 -O tmp/sars-cov-2 sequences.fasta --alignment-preset=high-diversity --verbosity=info ```
f501968
to
0b662fb
Compare
Nice stuff! @anna-parker you might be interested in this one potentially 😀 |
Define some hard-coded presets of alignment parameters additionally to the default one.
The
--alignment-preset
arg allows users to toggle between presets.Example: