[][src]Struct rust_htslib::bam::Writer

pub struct Writer { /* fields omitted */ }

A BAM writer.

Methods

impl Writer[src]

pub fn from_path<P: AsRef<Path>>(
    path: P,
    header: &Header
) -> Result<Self, WriterPathError>
[src]

Create a new BAM file.

Arguments

  • path - the path.
  • header - header definition to use

pub fn from_cram_path<P: AsRef<Path>>(
    path: P,
    header: &Header
) -> Result<Self, WriterPathError>
[src]

Create a new CRAM file.

Arguments

  • path - the path.
  • header - header definition to use

pub fn from_stdout(header: &Header) -> Result<Self, BGZFError>[src]

Create a new BAM file at STDOUT.

Arguments

  • header - header definition to use

pub fn set_threads(&mut self, n_threads: usize) -> Result<(), ThreadingError>[src]

Activate multi-threaded BAM write support in htslib. This should permit faster writing of large BAM files.

Arguments

  • n_threads - number of extra background writer threads to use, must be > 0.

pub fn write(&mut self, record: &Record) -> Result<(), WriteError>[src]

Write record to BAM.

Arguments

  • record - the record to write

pub fn header(&self) -> &HeaderView[src]

Return the header.

pub fn set_reference<P: AsRef<Path>>(
    &mut self,
    path: P
) -> Result<(), ReferencePathError>
[src]

Set the reference path for reading CRAM files.

Arguments

  • path - path to the FASTA reference

Trait Implementations

impl Send for Writer[src]

impl Drop for Writer[src]

impl Debug for Writer[src]

Auto Trait Implementations

impl !Sync for Writer

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]