-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
eric
committed
Mar 3, 2024
1 parent
e81f223
commit cb0f5e0
Showing
11 changed files
with
94 additions
and
158 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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
use clap::Parser; | ||
use kr2r::compact_hash::CompactHashTable; | ||
use kr2r::taxonomy::Taxonomy; | ||
use kr2r::IndexOptions; | ||
use std::io::Result; | ||
|
||
/// Command line arguments for the classify program. | ||
/// | ||
/// This structure defines the command line arguments that are accepted by the classify program. | ||
/// It uses the `clap` crate for parsing command line arguments. | ||
#[derive(Parser, Debug, Clone)] | ||
#[clap(version, about = "inspect")] | ||
struct Args { | ||
/// The file path for the Kraken 2 index. | ||
#[clap(short = 'H', long = "index-filename", value_parser, required = true)] | ||
index_filename: String, | ||
|
||
/// The file path for the Kraken 2 taxonomy. | ||
#[clap(short = 't', long = "taxonomy-filename", value_parser, required = true)] | ||
taxonomy_filename: String, | ||
|
||
/// The file path for the Kraken 2 options. | ||
#[clap(short = 'o', long = "options-filename", value_parser, required = true)] | ||
options_filename: String, | ||
} | ||
|
||
fn main() -> Result<()> { | ||
let args = Args::parse(); | ||
let idx_opts = IndexOptions::read_index_options(args.options_filename.clone())?; | ||
let taxo = Taxonomy::from_file(&args.taxonomy_filename)?; | ||
let cht = CompactHashTable::from(args.index_filename.clone())?; | ||
println!("index option {:?}", idx_opts); | ||
println!("taxonomy node count {:?}", taxo.node_count()); | ||
println!("compact hash table {:?}", cht); | ||
|
||
Ok(()) | ||
} |
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
Oops, something went wrong.