Trait fastq::Record
[−]
[src]
pub trait Record { fn seq(&self) -> &[u8]; fn head(&self) -> &[u8]; fn qual(&self) -> &[u8]; fn write<W: Write>(&self, writer: &mut W) -> Result<usize>; fn validate_dna(&self) -> bool { ... } fn validate_dnan(&self) -> bool { ... } }
Trait to be implemented by types that represent fastq records.
Required Methods
fn seq(&self) -> &[u8]
Return the fastq sequence as byte slice
fn head(&self) -> &[u8]
Return the id-line of the record as byte slice
fn qual(&self) -> &[u8]
Return the quality of the bases as byte slice
fn write<W: Write>(&self, writer: &mut W) -> Result<usize>
Write the record to a writer
Provided Methods
fn validate_dna(&self) -> bool
Return true if the sequence contains only A, C, T and G.
FIXME This might be much faster with a [bool; 256] array or using some simd instructions (eg with the jetscii crate).
fn validate_dnan(&self) -> bool
Return true if the sequence contains only A, C, T, G and N.
FIXME This might be much faster with a [bool; 256] array or using some simd instructions (eg with the jetscii crate).
Implementors
impl<'a> Record for RefRecord<'a>
impl Record for OwnedRecord