pub struct InputBamBuilder { /* private fields */ }Expand description
Builder for InputBam.
Implementations§
Source§impl InputBamBuilder
impl InputBamBuilder
Sourcepub fn bam_path(&mut self, value: PathOrURLOrStdin) -> &mut Self
pub fn bam_path(&mut self, value: PathOrURLOrStdin) -> &mut Self
Input BAM file. Set to a local file path, or set to - to read from stdin,
or set to a URL to read from a remote file. If using stdin and piping in
from samtools view, always include the header with the -h option.
Sourcepub fn min_seq_len<VALUE: Into<u64>>(&mut self, value: VALUE) -> &mut Self
pub fn min_seq_len<VALUE: Into<u64>>(&mut self, value: VALUE) -> &mut Self
Exclude reads whose sequence length in the BAM file is below this value. Defaults to 0.
Sourcepub fn min_align_len<VALUE: Into<i64>>(&mut self, value: VALUE) -> &mut Self
pub fn min_align_len<VALUE: Into<i64>>(&mut self, value: VALUE) -> &mut Self
Exclude reads whose alignment length in the BAM file is below this value. Defaults to unused.
Sourcepub fn read_id<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn read_id<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Only include this read id, defaults to unused i.e. all reads are used. NOTE: if there are multiple alignments corresponding to this read id, all of them are used.
Sourcepub fn read_id_list<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn read_id_list<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Path to file containing list of read IDs (one per line). Lines starting with ‘#’ are treated as comments and ignored. Cannot be used together with –read-id.
Sourcepub fn read_id_set<VALUE: Into<HashSet<String>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn read_id_set<VALUE: Into<HashSet<String>>>( &mut self, value: VALUE, ) -> &mut Self
Internal HashSet of read IDs loaded from read_id_list file.
This is populated automatically and not exposed to users.
Sourcepub fn threads<VALUE: Into<NonZeroU32>>(&mut self, value: VALUE) -> &mut Self
pub fn threads<VALUE: Into<NonZeroU32>>(&mut self, value: VALUE) -> &mut Self
Number of threads used during some aspects of program execution
Sourcepub fn include_zero_len(&mut self, value: bool) -> &mut Self
pub fn include_zero_len(&mut self, value: bool) -> &mut Self
Include “zero-length” sequences e.g. sequences with “*” in the sequence field. By default, these sequences are excluded to avoid processing errors. If this flag is set, these reads are included irrespective of any minimum sequence or align length criteria the user may have set. WARNINGS: (1) Some functions of the codebase may break or produce incorrect results if you use this flag. (2) due to a technical reason, we need a DNA sequence in the sequence field and cannot infer sequence length from other sources e.g. CIGAR strings.
Sourcepub fn read_filter(&mut self, value: String) -> &mut Self
pub fn read_filter(&mut self, value: String) -> &mut Self
Only retain reads of this type. Allowed types are primary_forward,
primary_reverse, secondary_forward, secondary_reverse, supplementary_forward,
supplementary_reverse and unmapped. Specify more than one type if needed
separated by commas, in which case reads of any type in list are retained.
Defaults to retain reads of all types.
Sourcepub fn sample_fraction(&mut self, value: F32Bw0and1) -> &mut Self
pub fn sample_fraction(&mut self, value: F32Bw0and1) -> &mut Self
Subsample BAM to retain only this fraction of total number of reads,
defaults to 1.0. The sampling algorithm considers every read according
to the specified probability, so due to this, you may not always get
the same number of reads e.g. if you set -s 0.05 in a file with 1000 reads,
you will get 50 +- sqrt(50) reads.
NOTE: a new subsample is drawn every time as the seed is not fixed.
If you want reproducibility, consider piping the output of samtools view -s
to our program.
Sourcepub fn mapq_filter<VALUE: Into<u8>>(&mut self, value: VALUE) -> &mut Self
pub fn mapq_filter<VALUE: Into<u8>>(&mut self, value: VALUE) -> &mut Self
Exclude reads whose MAPQ (Mapping quality of position) is below this value. Defaults to zero i.e. do not exclude any read.
Exclude sequences with MAPQ unavailable. In the BAM format, a value of 255 in this column means MAPQ is unavailable. These reads are allowed by default, set this flag to exclude.
Sourcepub fn region(&mut self, value: String) -> &mut Self
pub fn region(&mut self, value: String) -> &mut Self
Only keep reads passing through this region. If a BAM index is available with a name same as the BAM file but with the .bai suffix, the operation of selecting such reads will be faster. If you are using standard input as your input e.g. you are piping in the output from samtools, then you cannot use an index as a BAM filename is not available.
Sourcepub fn region_bed3<VALUE: Into<Bed3<i32, u64>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn region_bed3<VALUE: Into<Bed3<i32, u64>>>( &mut self, value: VALUE, ) -> &mut Self
Only keep read data from this region. This is an internal option not exposed to the user, we will set it based on the other options that the user sets.
Sourcepub fn full_region(&mut self, value: bool) -> &mut Self
pub fn full_region(&mut self, value: bool) -> &mut Self
Only keep reads if they pass through the specified region in full.
Related to the input --region; has no effect if that is not set.
Trait Implementations§
Source§impl Clone for InputBamBuilder
impl Clone for InputBamBuilder
Source§fn clone(&self) -> InputBamBuilder
fn clone(&self) -> InputBamBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for InputBamBuilder
impl RefUnwindSafe for InputBamBuilder
impl Send for InputBamBuilder
impl Sync for InputBamBuilder
impl Unpin for InputBamBuilder
impl UnwindSafe for InputBamBuilder
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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> Key for Twhere
T: Clone,
impl<T> Key for Twhere
T: Clone,
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
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.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.