pub struct Translate {
pub methionine: bool,
pub all_frames: bool,
pub frames: Vec<Frame>,
pub append_name: bool,
pub table: String,
pub show_table: bool,
}
Expand description
Translates a FASTA stream of DNA reads to peptides
The umgap translate
command takes one or more DNA sequences and translates them into amino
acid sequences.
The DNA sequences are expected in a FASTA format on standard input.
$ cat input.fa
>header1
GATTACAAA
$ umgap translate -f1 < input.fa
>header1
DYK
The -f
flag allows you to add reading frames to the translation. If you want to translate
multiple frames and care to keep them apart, the -n
flag adds the name of the frame to the end
of the FASTA header:
$ umgap translate -f1 -f1R < input.fa
>header1|1
DYK
>header1|1R
FVI
The -a
flag can be used as a shortcut to translate all 6 reading frames.
With the -t
flag, you can select a specific translation table, for instance -t11
for the
bacterial, archaeal and plant plastid code.
Fields§
§methionine: bool
Replace each start-codon with methionine
all_frames: bool
Read and output all six frames
frames: Vec<Frame>
Adds a reading frame (1, 2, 3, 1R, 2R or 3R)
append_name: bool
Append a bar (|) and the name of the frame to the fasta header
table: String
Translation table to use
show_table: bool
Instead of normal use, print the selected table and exit
Trait Implementations§
source§impl StructOpt for Translate
impl StructOpt for Translate
source§fn from_clap(matches: &ArgMatches<'_>) -> Self
fn from_clap(matches: &ArgMatches<'_>) -> Self
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,
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,
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
Vec
of your making.
Print the error message and quit the program in case of failure. Read more