Struct umgap::commands::buildindex::BuildIndex
source · pub struct BuildIndex {}
Expand description
Builds an index mapping short strings to taxon IDs
The umgap buildindex
command takes tab-separated strings and taxon IDs, and creates a
finite state transducer (FST) of this mapping.
The input is given on standard input. It should be in a TSV format with two columns, ordered by the first. The unique strings in the first column should be mapped to the integers (taxon IDs) in the second column. A binary file with a compressed mapping is written to standard output.
$ cat input.tsv
AAAAA 2759
BBBBBB 9153
$ umgap buildindex < input.tsv > tiny.index
$ umgap printindex tiny.index
AAAAA 2759
BBBBBB 9153
Trait Implementations§
source§impl Debug for BuildIndex
impl Debug for BuildIndex
source§impl StructOpt for BuildIndex
impl StructOpt for BuildIndex
source§fn from_clap(matches: &ArgMatches<'_>) -> Self
fn from_clap(matches: &ArgMatches<'_>) -> Self
Builds the struct from
clap::ArgMatches
. It’s guaranteed to succeed
if matches
originates from an App
generated by StructOpt::clap
called on
the same type, otherwise it must panic.source§fn from_args() -> Selfwhere
Self: Sized,
fn from_args() -> Selfwhere
Self: Sized,
Builds the struct from the command line arguments (
std::env::args_os
).
Calls clap::Error::exit
on failure, printing the error message and aborting the program.source§fn from_args_safe() -> Result<Self, Error>where
Self: Sized,
fn from_args_safe() -> Result<Self, Error>where
Self: Sized,
Builds the struct from the command line arguments (
std::env::args_os
).
Unlike StructOpt::from_args
, returns clap::Error
on failure instead of aborting the program,
so calling .exit
is up to you.source§fn from_iter<I>(iter: I) -> Self
fn from_iter<I>(iter: I) -> Self
Gets the struct from any iterator such as a
Vec
of your making.
Print the error message and quit the program in case of failure. Read moreAuto Trait Implementations§
impl RefUnwindSafe for BuildIndex
impl Send for BuildIndex
impl Sync for BuildIndex
impl Unpin for BuildIndex
impl UnwindSafe for BuildIndex
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more