Struct bigtools::BigWigWrite
source · pub struct BigWigWrite {
pub path: String,
pub options: BBIWriteOptions,
}
Expand description
The struct used to write a bigWig file
Fields§
§path: String
§options: BBIWriteOptions
Implementations§
source§impl BigWigWrite
impl BigWigWrite
pub fn create_file(path: String) -> Self
sourcepub fn write<Values: ChromValues<Value = Value> + Send + 'static, V: ChromData<Values = Values>>(
self,
chrom_sizes: HashMap<String, u32>,
vals: V,
runtime: Runtime
) -> Result<(), ProcessChromError<Values::Error>>
pub fn write<Values: ChromValues<Value = Value> + Send + 'static, V: ChromData<Values = Values>>( self, chrom_sizes: HashMap<String, u32>, vals: V, runtime: Runtime ) -> Result<(), ProcessChromError<Values::Error>>
Write the values from V
as a bigWig. Will utilize the provided runtime for encoding values and for reading through the values (potentially parallelized by chromosome).
sourcepub fn write_singlethreaded<Values: ChromValues<Value = Value>, V: ChromData<Values = Values>>(
self,
chrom_sizes: HashMap<String, u32>,
vals: V,
runtime: Runtime
) -> Result<(), ProcessChromError<Values::Error>>
pub fn write_singlethreaded<Values: ChromValues<Value = Value>, V: ChromData<Values = Values>>( self, chrom_sizes: HashMap<String, u32>, vals: V, runtime: Runtime ) -> Result<(), ProcessChromError<Values::Error>>
Write the values from V
as a bigWig. Will utilize the provided runtime for encoding values, but will read through values on the current thread.
sourcepub fn write_multipass<Values: ChromValues<Value = Value> + Send + 'static, V: ChromData<Values = Values>>(
self,
make_vals: impl Fn() -> Result<V, ProcessChromError<Values::Error>>,
chrom_sizes: HashMap<String, u32>,
runtime: Runtime
) -> Result<(), ProcessChromError<Values::Error>>
pub fn write_multipass<Values: ChromValues<Value = Value> + Send + 'static, V: ChromData<Values = Values>>( self, make_vals: impl Fn() -> Result<V, ProcessChromError<Values::Error>>, chrom_sizes: HashMap<String, u32>, runtime: Runtime ) -> Result<(), ProcessChromError<Values::Error>>
Write the values from V
as a bigWig. Will utilize the provided runtime for encoding values and for reading through the values (potentially parallelized by chromosome).
This will take two passes on the provided values: first to write the values themselves, then the zooms. This is beneficial over write
on smaller files, where the encoding of
high resolution zooms takes up a substantial portion of total processing time.