Struct rust_htslib::bcf::Writer
[−]
[src]
pub struct Writer { /* fields omitted */ }
A VCF/BCF writer.
Methods
impl Writer
[src]
pub fn from_path<P: AsRef<Path>>(
path: P,
header: &Header,
uncompressed: bool,
vcf: bool
) -> Result<Self, BCFPathError>
[src]
path: P,
header: &Header,
uncompressed: bool,
vcf: bool
) -> Result<Self, BCFPathError>
Create a new writer that writes to the given path.
Arguments
path
- the path.header
- header definition to useuncompressed
- disable compressionvcf
- write VCF instead of BCF
pub fn from_url(
url: &Url,
header: &Header,
uncompressed: bool,
vcf: bool
) -> Result<Self, BCFError>
[src]
url: &Url,
header: &Header,
uncompressed: bool,
vcf: bool
) -> Result<Self, BCFError>
pub fn from_stdout(
header: &Header,
uncompressed: bool,
vcf: bool
) -> Result<Self, BCFError>
[src]
header: &Header,
uncompressed: bool,
vcf: bool
) -> Result<Self, BCFError>
pub fn header(&self) -> &HeaderView
[src]
pub fn empty_record(&self) -> Record
[src]
Create empty record for writing to this writer. The record can be reused multiple times.
pub fn translate(&mut self, record: &mut Record)
[src]
Translate record to header of this writer.
pub fn subset(&mut self, record: &mut Record)
[src]
Subset samples of record to match header of this writer.
pub fn write(&mut self, record: &Record) -> Result<(), WriteError>
[src]
pub fn set_threads(&mut self, n_threads: usize) -> Result<(), ThreadingError>
[src]
Activate multi-threaded BCF write support in htslib. This should permit faster writing of large BCF files.
Arguments
n_threads
- number of extra background writer threads to use, must be> 0
.
Trait Implementations
impl Debug for Writer
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more