pub struct FastqWriter { /* private fields */ }Expand description
A FASTQ writer that writes bgzf-compressed output.
The inner writer handles BGZF block framing and compression. Use
new for single-threaded compression or
from_writer to supply a pre-configured writer
(e.g. a pooled_writer::PooledWriter for multi-threaded compression).
Implementations§
Source§impl FastqWriter
impl FastqWriter
Sourcepub fn new(path: &Path, compression: u8) -> Result<Self>
pub fn new(path: &Path, compression: u8) -> Result<Self>
Create a new single-threaded FASTQ writer at the given path.
Uses noodles-bgzf with the specified compression level (0-12).
§Errors
Returns an error if the file cannot be created or the compression level is invalid.
Sourcepub fn from_writer(writer: impl Write + 'static) -> Self
pub fn from_writer(writer: impl Write + 'static) -> Self
Create a FASTQ writer from an existing writer that handles BGZF
compression (e.g. a pooled_writer::PooledWriter).
Sourcepub fn write_read(&mut self, read: &SimulatedRead) -> Result<()>
pub fn write_read(&mut self, read: &SimulatedRead) -> Result<()>
Write a single read as a FASTQ record.
Writes the four-line FASTQ format:
@read_name
BASES
+
QUALITIES§Errors
Returns an error if writing fails.
Auto Trait Implementations§
impl Freeze for FastqWriter
impl !RefUnwindSafe for FastqWriter
impl !Send for FastqWriter
impl !Sync for FastqWriter
impl Unpin for FastqWriter
impl UnsafeUnpin for FastqWriter
impl !UnwindSafe for FastqWriter
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
Mutably borrows from an owned value. Read more