Skip to content

Commit

Permalink
feat: allow AlignmentMode to be used on the command line (#44)
Browse files Browse the repository at this point in the history
* Allow AlignmentMode to be used on the command line
  • Loading branch information
nh13 committed May 19, 2023
1 parent 5e078d4 commit 40846fb
Show file tree
Hide file tree
Showing 3 changed files with 170 additions and 1 deletion.
166 changes: 166 additions & 0 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ exclude = [".gitignore", ".github"]
[features]
phylogeny = ["petgraph"]


[dependencies]
serde = { version = "^1", optional = true, features=["derive"] }
clap = { version = ">=3.2.0", optional = true, features = ["derive"] }
thiserror = "1"
regex = "1.0"
lazy_static = "1.1"
Expand Down
3 changes: 3 additions & 0 deletions src/alignment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

//! Types for representing pairwise sequence alignments

#[cfg(feature = "clap")]
use clap::ValueEnum;
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};

Expand Down Expand Up @@ -38,6 +40,7 @@ pub enum AlignmentOperation {
///
/// The default alignment mode is Global.
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "clap", derive(ValueEnum))]
#[derive(Debug, PartialEq, Eq, Copy, Clone)]
pub enum AlignmentMode {
Local,
Expand Down

0 comments on commit 40846fb

Please sign in to comment.