[−][src]Struct rust_htslib::bam::Writer
A BAM writer.
Methods
impl Writer
[src]
pub fn from_path<P: AsRef<Path>>(
path: P,
header: &Header,
format: Format
) -> Result<Self>
[src]
path: P,
header: &Header,
format: Format
) -> Result<Self>
Create a new SAM/BAM/CRAM file.
Arguments
path
- the path.header
- header definition to useformat
- the format to use (SAM/BAM/CRAM)
pub fn from_stdout(header: &Header, format: Format) -> Result<Self>
[src]
Create a new SAM/BAM/CRAM file at STDOUT.
Arguments
header
- header definition to useformat
- the format to use (SAM/BAM/CRAM)
pub fn set_threads(&mut self, n_threads: usize) -> Result<()>
[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<()>
[src]
pub fn header(&self) -> &HeaderView
[src]
Return the header.
pub fn set_reference<P: AsRef<Path>>(&mut self, path: P) -> Result<()>
[src]
pub fn set_compression_level(
&mut self,
compression_level: CompressionLevel
) -> Result<()>
[src]
&mut self,
compression_level: CompressionLevel
) -> Result<()>
Set the compression level for writing BAM/CRAM files.
Arguments
compression_level
-CompressionLevel
enum variant
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,