[][src]Struct needletail::sequence_record::SequenceRecord

pub struct SequenceRecord<'a> {
    pub id: Cow<'a, [u8]>,
    pub seq: Cow<'a, [u8]>,
    pub qual: Option<Cow<'a, [u8]>>,
}

An intermediate structure for handling sequence data and harmonizing both FASTA and FASTQ records into a common format.

Fields

id: Cow<'a, [u8]>seq: Cow<'a, [u8]>qual: Option<Cow<'a, [u8]>>

Methods

impl<'a> SequenceRecord<'a>[src]

pub fn new(
    id: Cow<'a, [u8]>,
    seq: Cow<'a, [u8]>,
    qual: Option<Cow<'a, [u8]>>
) -> Self
[src]

Creates a new SequenceRecord

pub fn mask_header(self) -> Self[src]

Fixes up potential problems with sequence headers including tabs being present (may break downstream analyses with headers in TSVs) and with non-UTF8 characters being present, e.g. non-breaking spaces on Windows encodings (0x0A) breaks some tools.

pub fn write_fasta(
    &self,
    writer: &mut dyn Write,
    ending: &[u8]
) -> Result<(), ParseError>
[src]

Write this SequenceRecord to writer as a FASTA with the provided line ending (ending should be either \r\n or preferably \n).

pub fn write_fastq(
    &self,
    writer: &mut dyn Write,
    ending: &[u8]
) -> Result<(), ParseError>
[src]

Write this SequenceRecord to writer as a FASTQ with the provided line ending (ending should be either \r\n or preferably \n).

Trait Implementations

impl<'a> Sequence<'a> for SequenceRecord<'a>[src]

impl<'a> QualitySequence<'a> for SequenceRecord<'a>[src]

impl<'a> From<FastaRecord<'a>> for SequenceRecord<'a>[src]

impl<'a> From<FastqRecord<'a>> for SequenceRecord<'a>[src]

impl<'a> From<&'a [u8]> for SequenceRecord<'a>[src]

Auto Trait Implementations

impl<'a> Send for SequenceRecord<'a>

impl<'a> Unpin for SequenceRecord<'a>

impl<'a> Sync for SequenceRecord<'a>

impl<'a> UnwindSafe for SequenceRecord<'a>

impl<'a> RefUnwindSafe for SequenceRecord<'a>

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]