pub enum Commands {
Show 16 variants
Stats {
bam: String,
qbed: bool,
paf: bool,
},
BedLength {
bed: Vec<String>,
readable: bool,
column: Option<u8>,
},
Filter {
paf: String,
paired_len: u64,
aln: u64,
query: u64,
},
Invert {
paf: String,
},
Liftover {
paf: String,
bed: String,
qbed: bool,
largest: bool,
},
TrimPaf {
paf: String,
match_score: i32,
diff_score: i32,
indel_score: i32,
remove_contained: bool,
},
Orient {
paf: String,
scaffold: bool,
insert: u64,
},
BreakPaf {
paf: String,
max_size: u32,
},
PafToSam {
paf: String,
fasta: Option<String>,
},
FastxSplit {
fastx: Vec<String>,
},
GetFasta {
fasta: String,
bed: String,
strand: bool,
name: bool,
},
Nucfreq {
bam: String,
region: Option<String>,
bed: Option<String>,
small: bool,
},
Repeat {
fasta: String,
min: usize,
},
Suns {
fasta: String,
kmer_size: usize,
max_size: usize,
validate: bool,
},
AddRg {
source: String,
threads: usize,
uncompressed: bool,
sample: Option<String>,
},
SeqStats {
infiles: Vec<String>,
threads: usize,
human: bool,
quantiles: Vec<f64>,
genome_size: Option<usize>,
},
}
Expand description
This structure contains all the subcommands for rustybam and their help descriptions.
Because of naming conventions for rust enums the commands names have
different capitalization than on the command line.
For example, the Liftover
enum is invoked using rustybam liftover
and the TrimPaf
command with rustybam trim-paf
.
Variants§
Stats
Get percent identity stats from a sam/bam/cram or PAF. Requires =/X operations in the CIGAR string!
§output column descriptions:
§perID_by_matches is calculated as:
matches / (matches + mismatches)
§perID_by_events is calculated as:
matches / (matches + mismatches + insertion events + deletion events)
§perID_by_all is calculated as:
matches / (matches + mismatches + insertion bases + deletion bases)
Fields
BedLength
Count the number of bases in a bed file.
Fields
Filter
Filter PAF records in various ways.
Fields
paf: String
PAF file from minimap2 or unimap. Must have the cg tag, and n matches will be zero unless the cigar uses =X.
Invert
Invert the target and query sequences in a PAF along with the CIGAR string.
Fields
Liftover
Liftover target sequence coordinates onto query sequence using a PAF.
This is a function for lifting over coordinates from a reference (paftools.js sam2paf
to convert SAM data to PAF format).
The returned file is a PAF file that is trimmed to the regions in the bed file. Even the cigar in the returned PAF file is trimmed so it can be used downstream! Additionally, a tag with the format id:Z:<>
is added to the PAF where <>
is either the 4th column of the input bed file or if not present chr_start_end
.
Fields
paf: String
PAF file from minimap2 or unimap run with -c and –eqx [i.e. the PAF file must have the cg tag and use extended CIGAR opts (=/X)].
TrimPaf
Trim PAF records that overlap in query sequence to find and optimal splitting point using dynamic programing.
Note, this can be combined with rb invert
to also trim the target sequence.
This idea is to mimic some of the trimming that happens in PAV to improve breakpoint detection. Starts with the largest overlap and iterates until no query overlaps remain.
Fields
Orient
Orient paf records so that most of the bases are in the forward direction.
Optionally scaffold the queriers so that there is one query per target.
Fields
paf: String
PAF file from minimap2 or unimap. Must have the cg tag, and n matches will be zero unless the cigar uses =X.
BreakPaf
Break PAF records with large indels into multiple records (useful for SafFire).
Fields
PafToSam
Convert a PAF file into a SAM file. Warning, all alignments will be marked as primary!
Fields
FastxSplit
Splits fastx from stdin into multiple files.
Specifically it reads fastx format (fastq, fasta, or mixed) from stdin and divides the records across multiple output files. Output files can be compressed by adding .gz
, and the input can also be compressed or uncompressed.
GetFasta
Mimic bedtools getfasta but allow for bgzip in both bed and fasta inputs.
Fields
Nucfreq
Get the frequencies of each bp at each position.
Fields
Repeat
Report the longest exact repeat length at every position in a fasta.
Suns
Extract the intervals in a genome (fasta) that are made up of SUNs.
Fields
AddRg
Add RG lines from a source BAM file to the BAM from stdin to the BAM going to stdout
Fields
SeqStats
Calculate summary statistics from fasta/q, sam, bam, or bed files. e.g. N50, mean, quantiles.
Trait Implementations§
Source§impl FromArgMatches for Commands
impl FromArgMatches for Commands
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches
to self
.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches
to self
.Source§impl Subcommand for Commands
impl Subcommand for Commands
Source§fn augment_subcommands<'b>(__clap_app: Command<'b>) -> Command<'b>
fn augment_subcommands<'b>(__clap_app: Command<'b>) -> Command<'b>
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command<'b>) -> Command<'b>
fn augment_subcommands_for_update<'b>(__clap_app: Command<'b>) -> Command<'b>
Source§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self
can parse a specific subcommandAuto Trait Implementations§
impl Freeze for Commands
impl RefUnwindSafe for Commands
impl Send for Commands
impl Sync for Commands
impl Unpin for Commands
impl UnwindSafe for Commands
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.