pub struct RawSequenceRead {
pub sequence: String,
/* private fields */
}Expand description
A struct to hold the raw sequencing information and transform it if there are sequencing errors
Fields§
§sequence: StringImplementations§
Source§impl RawSequenceRead
impl RawSequenceRead
pub fn new() -> Self
pub fn new_fill( line_1: String, line_2: String, line_3: String, line_4: String, ) -> RawSequenceRead
pub fn add_line(&mut self, line_num: u16, line: String) -> Result<()>
pub fn pack(&self) -> String
pub fn unpack(raw_string: String) -> Result<Self>
Sourcepub fn insert_barcodes_constant_region(
&mut self,
format_string: &str,
best_sequence: String,
)
pub fn insert_barcodes_constant_region( &mut self, format_string: &str, best_sequence: String, )
Replaces the ’N’s in the sequencing format with the barcodes to fix any sequencing errrors that would cause the regex search not to work
Sourcepub fn fix_constant_region(
&mut self,
format_string: &str,
max_constant_errors: u16,
)
pub fn fix_constant_region( &mut self, format_string: &str, max_constant_errors: u16, )
Fixes the constant region by finding the closest match within the full seqeuence that has fewer than the max errors allowed, then uses the format string to flip the barcodes into the ’N’s and have a fixed constant region string
Sourcepub fn quality_scores(&self) -> Vec<u8> ⓘ
pub fn quality_scores(&self) -> Vec<u8> ⓘ
Each DNA base read score within FASTQ is the ascii number - 33. This returns the number scores associated with the ascii values
Score Error Probability 40 0.0001 30 0.001 20 0.01 10 0.1
Sourcepub fn low_quality(
&self,
min_average: f32,
barcode_indicator_string: &str,
start: usize,
) -> bool
pub fn low_quality( &self, min_average: f32, barcode_indicator_string: &str, start: usize, ) -> bool
Test for if any of the barcode average quality score falls below the min_average cutoff
pub fn check_fastq_format(&self) -> Result<()>
Trait Implementations§
Source§impl Clone for RawSequenceRead
impl Clone for RawSequenceRead
Source§fn clone(&self) -> RawSequenceRead
fn clone(&self) -> RawSequenceRead
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for RawSequenceRead
impl Default for RawSequenceRead
Auto Trait Implementations§
impl Freeze for RawSequenceRead
impl RefUnwindSafe for RawSequenceRead
impl Send for RawSequenceRead
impl Sync for RawSequenceRead
impl Unpin for RawSequenceRead
impl UnwindSafe for RawSequenceRead
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> 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 more