pub struct Uniq {
pub separator: String,
pub wrap: bool,
pub delimiter: Option<String>,
}
Expand description
Joins consecutive FASTA records with the same header
The umgap uniq
command can for example be used to join together the predictions of 2 paired
ends before aggregation.
The input is given in a FASTA format on standard input. The content of all consecutive records
with the same FASTA header is joined under a single header, separated by newlines (or another
separator set with -s
).
A delimiter can be passed with the -d
option to drop this delimiter and everything after it
from the FASTA header before comparing it.
$ cat input.fa
>header1/1
147206
240495
>header1/2
1883
1
1883
1883
$ umgap uniq -d / < input.fa
>header1
147206
240495
1883
1
1883
1883
Fields§
§separator: String
Separator between output items
wrap: bool
Wrap the output sequences
delimiter: Option<String>
Strip FASTA headers after this string
Trait Implementations§
source§impl StructOpt for Uniq
impl StructOpt for Uniq
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 Uniq
impl Send for Uniq
impl Sync for Uniq
impl Unpin for Uniq
impl UnwindSafe for Uniq
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