#[non_exhaustive]pub struct ConvertOptions {
pub indexed: bool,
pub centroid: bool,
pub centroid_min_intensity: Option<f32>,
pub write: WriteOptions,
}Expand description
Options for convert_to_mzml and convert_to_mzml_writer.
The defaults write un-indexed mzML with zlib-compressed arrays, no centroiding, and stop at the first unreadable record.
use openmassspec_io::core::RecordErrorPolicy;
use openmassspec_io::ConvertOptions;
let opts = ConvertOptions::new()
.with_indexed(true)
.with_centroid(true)
.with_record_error_policy(RecordErrorPolicy::Skip);
assert!(opts.indexed);Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.indexed: boolEmit indexed mzML (<indexList> and <fileChecksum>).
centroid: boolCentroid every profile-mode spectrum before writing (local-maxima peak picking; already-centroided spectra pass through unchanged).
centroid_min_intensity: Option<f32>When centroiding, discard picked peaks below this intensity.
Ignored unless centroid is set.
write: WriteOptionsWriter options from openmassspec-core: binary array compression
and the record-error policy.
Implementations§
Source§impl ConvertOptions
impl ConvertOptions
Sourcepub fn with_indexed(self, indexed: bool) -> Self
pub fn with_indexed(self, indexed: bool) -> Self
Emit indexed mzML.
Sourcepub fn with_centroid(self, centroid: bool) -> Self
pub fn with_centroid(self, centroid: bool) -> Self
Centroid profile-mode spectra before writing.
Sourcepub fn with_centroid_min_intensity(
self,
min_intensity: impl Into<Option<f32>>,
) -> Self
pub fn with_centroid_min_intensity( self, min_intensity: impl Into<Option<f32>>, ) -> Self
Noise floor for centroiding.
Sourcepub fn with_compression(self, compression: Compression) -> Self
pub fn with_compression(self, compression: Compression) -> Self
Binary data array compression.
Sourcepub fn with_record_error_policy(self, policy: RecordErrorPolicy) -> Self
pub fn with_record_error_policy(self, policy: RecordErrorPolicy) -> Self
What to do with a spectrum or chromatogram the reader cannot
decode. RecordErrorPolicy::Fail (the default) stops and returns
the error; RecordErrorPolicy::Skip leaves it out and counts it
in the returned WriteSummary.
Sourcepub fn with_write_options(self, write: WriteOptions) -> Self
pub fn with_write_options(self, write: WriteOptions) -> Self
Replace the writer options wholesale.