#[non_exhaustive]pub enum MZReaderType<R, C = CentroidPeak, D = DeconvolutedPeak>where
R: Read + Seek,
C: CentroidLike + From<CentroidPeak> + BuildFromArrayMap,
D: DeconvolutedCentroidLike + From<DeconvolutedPeak> + BuildFromArrayMap,{
Unknown(Box<dyn SpectrumSourceWithMetadata<C, D, Item = MultiLayerSpectrum<C, D>> + Send + Sync>, PhantomData<R>),
}
Expand description
An explicit file format dispatching ADT that provides the complete SpectrumSource
,
RandomAccessSpectrumIterator
, MZFileReader
and MSDataFileMetadata
APIs.
The preferred means of creating an instance is through the MZReaderType::open_path
function.
This type internally wraps a concrete type and each operation has to perform a very fast test to decide which implementation to invoke. This overhead should be trivial for the vast majority of operations, as compared to the I/O being performed otherwise.
Please refer to each concrete implementation type for details about those types. Keep in mind that formats that require specific features to be enabled to be available won’t even be visible if their required features aren’t set since their variants would have an unknown size at compile time.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Unknown(Box<dyn SpectrumSourceWithMetadata<C, D, Item = MultiLayerSpectrum<C, D>> + Send + Sync>, PhantomData<R>)
Implementations§
Source§impl<R, C, D> MZReaderType<R, C, D>where
R: Read + Seek,
C: CentroidLike + From<CentroidPeak> + BuildFromArrayMap,
D: DeconvolutedCentroidLike + From<DeconvolutedPeak> + BuildFromArrayMap,
impl<R, C, D> MZReaderType<R, C, D>where
R: Read + Seek,
C: CentroidLike + From<CentroidPeak> + BuildFromArrayMap,
D: DeconvolutedCentroidLike + From<DeconvolutedPeak> + BuildFromArrayMap,
Sourcepub fn builder() -> MZReaderBuilder<C, D>
pub fn builder() -> MZReaderBuilder<C, D>
Create a MZReaderBuilder
which can be used to configure the
created reader, setting DetailLevel
and buffer capacity
The builder can create a reader from any type that the
direct creation functions support.
Sourcepub fn as_format(&self) -> MassSpectrometryFormat
pub fn as_format(&self) -> MassSpectrometryFormat
Get the file format for this reader
Sourcepub fn detail_level(&self) -> &DetailLevel
pub fn detail_level(&self) -> &DetailLevel
Get the DetailLevel
the reader currently uses
Sourcepub fn set_detail_level(&mut self, detail_level: DetailLevel)
pub fn set_detail_level(&mut self, detail_level: DetailLevel)
Set the DetailLevel
for the reader, changing
the amount of work done immediately on loading a
spectrum.
§Note
Not all readers support all detail levels, and the behavior when requesting one of those levels will depend upon the underlying reader.
Sourcepub fn open_read_seek(stream: R) -> Result<MZReaderType<R, C, D>, Error>
pub fn open_read_seek(stream: R) -> Result<MZReaderType<R, C, D>, Error>
Sourcepub fn open_gzipped_read_seek(
stream: R,
) -> Result<MZReaderType<RestartableGzDecoder<BufReader<R>>, C, D>, Error>
pub fn open_gzipped_read_seek( stream: R, ) -> Result<MZReaderType<RestartableGzDecoder<BufReader<R>>, C, D>, Error>
Source§impl<R, C, D> MZReaderType<PreBufferedStream<R>, C, D>where
R: Read,
C: CentroidLike + From<CentroidPeak> + BuildFromArrayMap,
D: DeconvolutedCentroidLike + From<DeconvolutedPeak> + BuildFromArrayMap,
impl<R, C, D> MZReaderType<PreBufferedStream<R>, C, D>where
R: Read,
C: CentroidLike + From<CentroidPeak> + BuildFromArrayMap,
D: DeconvolutedCentroidLike + From<DeconvolutedPeak> + BuildFromArrayMap,
Sourcepub fn open_read(
stream: R,
) -> Result<StreamingSpectrumIterator<C, D, MultiLayerSpectrum<C, D>, MZReaderType<PreBufferedStream<R>, C, D>>, Error>
pub fn open_read( stream: R, ) -> Result<StreamingSpectrumIterator<C, D, MultiLayerSpectrum<C, D>, MZReaderType<PreBufferedStream<R>, C, D>>, Error>
Create a reader from a type that supports io::Read
.
This will internally wrap the file in a PreBufferedStream
for metadata
reading, but does not construct an index for full random access. Attempting
to use the reader to access spectra may move the reader forwards, but it can
never go backwards.
§Note
Not all formats can be read from an io
type, these will
fail to open and an error will be returned
Sourcepub fn open_gzipped_read(
stream: R,
) -> Result<StreamingSpectrumIterator<C, D, MultiLayerSpectrum<C, D>, MZReaderType<PreBufferedStream<GzDecoder<PreBufferedStream<R>>>, C, D>>, Error>
pub fn open_gzipped_read( stream: R, ) -> Result<StreamingSpectrumIterator<C, D, MultiLayerSpectrum<C, D>, MZReaderType<PreBufferedStream<GzDecoder<PreBufferedStream<R>>>, C, D>>, Error>
Create a reader from a type that supports io::Read
is gzip-compressed.
This will internally wrap the file in a PreBufferedStream
for metadata
reading, but does not construct an index for full random access. Attempting
to use the reader to access spectra may move the reader forwards, but it can
never go backwards.
§Note
This method will return an error if the stream is not gzip-compressed.
Not all formats can be read from an io
type, these will
fail to open and an error will be returned
Sourcepub fn open_read_with_buffer_size(
stream: R,
buffer_size: usize,
) -> Result<StreamingSpectrumIterator<C, D, MultiLayerSpectrum<C, D>, MZReaderType<PreBufferedStream<R>, C, D>>, Error>
pub fn open_read_with_buffer_size( stream: R, buffer_size: usize, ) -> Result<StreamingSpectrumIterator<C, D, MultiLayerSpectrum<C, D>, MZReaderType<PreBufferedStream<R>, C, D>>, Error>
This function lets the caller specify the prebuffering size for files with large headers that exceed the default buffer size.
Trait Implementations§
Source§impl<R, C, D> ChromatogramSource for MZReaderType<R, C, D>where
R: Read + Seek,
C: CentroidLike + From<CentroidPeak> + BuildFromArrayMap,
D: DeconvolutedCentroidLike + From<DeconvolutedPeak> + BuildFromArrayMap,
impl<R, C, D> ChromatogramSource for MZReaderType<R, C, D>where
R: Read + Seek,
C: CentroidLike + From<CentroidPeak> + BuildFromArrayMap,
D: DeconvolutedCentroidLike + From<DeconvolutedPeak> + BuildFromArrayMap,
Source§fn get_chromatogram_by_id(&mut self, id: &str) -> Option<Chromatogram>
fn get_chromatogram_by_id(&mut self, id: &str) -> Option<Chromatogram>
Chromatogram
by its identifier, if it exists.Source§fn get_chromatogram_by_index(&mut self, index: usize) -> Option<Chromatogram>
fn get_chromatogram_by_index(&mut self, index: usize) -> Option<Chromatogram>
Chromatogram
by its index, if it exists.Source§fn iter_chromatograms(&mut self) -> ChromatogramIterator<'_, Self> ⓘwhere
Self: Sized,
fn iter_chromatograms(&mut self) -> ChromatogramIterator<'_, Self> ⓘwhere
Self: Sized,
Chromatogram
s with a ChromatogramIterator
Source§impl<R, C, D> Debug for MZReaderType<R, C, D>where
R: Read + Seek,
C: CentroidLike + From<CentroidPeak> + BuildFromArrayMap,
D: DeconvolutedCentroidLike + From<DeconvolutedPeak> + BuildFromArrayMap,
impl<R, C, D> Debug for MZReaderType<R, C, D>where
R: Read + Seek,
C: CentroidLike + From<CentroidPeak> + BuildFromArrayMap,
D: DeconvolutedCentroidLike + From<DeconvolutedPeak> + BuildFromArrayMap,
Source§impl<C, D, R> IntoIonMobilityFrameSource<C, D> for MZReaderType<R, C, D>where
C: CentroidLike + From<CentroidPeak> + BuildFromArrayMap,
D: DeconvolutedCentroidLike + From<DeconvolutedPeak> + BuildFromArrayMap,
R: Read + Seek,
impl<C, D, R> IntoIonMobilityFrameSource<C, D> for MZReaderType<R, C, D>where
C: CentroidLike + From<CentroidPeak> + BuildFromArrayMap,
D: DeconvolutedCentroidLike + From<DeconvolutedPeak> + BuildFromArrayMap,
R: Read + Seek,
Source§type IonMobilityFrameSource<CF: FeatureLike<MZ, IonMobility>, DF: FeatureLike<Mass, IonMobility> + KnownCharge> = IMMZReaderType<R, CF, DF, C, D>
type IonMobilityFrameSource<CF: FeatureLike<MZ, IonMobility>, DF: FeatureLike<Mass, IonMobility> + KnownCharge> = IMMZReaderType<R, CF, DF, C, D>
Source§fn try_into_frame_source<CF, DF>(
self,
) -> Result<<MZReaderType<R, C, D> as IntoIonMobilityFrameSource<C, D>>::IonMobilityFrameSource<CF, DF>, IntoIonMobilityFrameSourceError>
fn try_into_frame_source<CF, DF>( self, ) -> Result<<MZReaderType<R, C, D> as IntoIonMobilityFrameSource<C, D>>::IonMobilityFrameSource<CF, DF>, IntoIonMobilityFrameSourceError>
SpectrumSource
into an IonMobilityFrameSource
, returning IntoIonMobilityFrameSourceError
if it is not possibleSource§fn into_frame_source<CF, DF>(self) -> Self::IonMobilityFrameSource<CF, DF>
fn into_frame_source<CF, DF>(self) -> Self::IonMobilityFrameSource<CF, DF>
IntoIonMobilityFrameSource::try_into_frame_source
, panicking if an error is returned.Source§fn has_ion_mobility(&mut self) -> Option<HasIonMobility>
fn has_ion_mobility(&mut self) -> Option<HasIonMobility>
SpectrumSource
, testing
for the presence of ion mobility data.Source§impl<C, D, R> Iterator for MZReaderType<R, C, D>where
C: CentroidLike + From<CentroidPeak> + BuildFromArrayMap,
D: DeconvolutedCentroidLike + From<DeconvolutedPeak> + BuildFromArrayMap,
R: Read + Seek,
impl<C, D, R> Iterator for MZReaderType<R, C, D>where
C: CentroidLike + From<CentroidPeak> + BuildFromArrayMap,
D: DeconvolutedCentroidLike + From<DeconvolutedPeak> + BuildFromArrayMap,
R: Read + Seek,
Source§type Item = MultiLayerSpectrum<C, D>
type Item = MultiLayerSpectrum<C, D>
Source§fn next(&mut self) -> Option<<MZReaderType<R, C, D> as Iterator>::Item>
fn next(&mut self) -> Option<<MZReaderType<R, C, D> as Iterator>::Item>
Source§fn next_chunk<const N: usize>(
&mut self,
) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>where
Self: Sized,
fn next_chunk<const N: usize>(
&mut self,
) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>where
Self: Sized,
iter_next_chunk
)N
values. Read more1.0.0 · Source§fn size_hint(&self) -> (usize, Option<usize>)
fn size_hint(&self) -> (usize, Option<usize>)
1.0.0 · Source§fn count(self) -> usizewhere
Self: Sized,
fn count(self) -> usizewhere
Self: Sized,
1.0.0 · Source§fn last(self) -> Option<Self::Item>where
Self: Sized,
fn last(self) -> Option<Self::Item>where
Self: Sized,
Source§fn advance_by(&mut self, n: usize) -> Result<(), NonZero<usize>>
fn advance_by(&mut self, n: usize) -> Result<(), NonZero<usize>>
iter_advance_by
)n
elements. Read more1.0.0 · Source§fn nth(&mut self, n: usize) -> Option<Self::Item>
fn nth(&mut self, n: usize) -> Option<Self::Item>
n
th element of the iterator. Read more1.28.0 · Source§fn step_by(self, step: usize) -> StepBy<Self>where
Self: Sized,
fn step_by(self, step: usize) -> StepBy<Self>where
Self: Sized,
1.0.0 · Source§fn chain<U>(self, other: U) -> Chain<Self, <U as IntoIterator>::IntoIter>
fn chain<U>(self, other: U) -> Chain<Self, <U as IntoIterator>::IntoIter>
1.0.0 · Source§fn zip<U>(self, other: U) -> Zip<Self, <U as IntoIterator>::IntoIter>where
Self: Sized,
U: IntoIterator,
fn zip<U>(self, other: U) -> Zip<Self, <U as IntoIterator>::IntoIter>where
Self: Sized,
U: IntoIterator,
Source§fn intersperse(self, separator: Self::Item) -> Intersperse<Self>
fn intersperse(self, separator: Self::Item) -> Intersperse<Self>
iter_intersperse
)separator
between adjacent
items of the original iterator. Read moreSource§fn intersperse_with<G>(self, separator: G) -> IntersperseWith<Self, G>
fn intersperse_with<G>(self, separator: G) -> IntersperseWith<Self, G>
iter_intersperse
)separator
between adjacent items of the original iterator. Read more1.0.0 · Source§fn map<B, F>(self, f: F) -> Map<Self, F>
fn map<B, F>(self, f: F) -> Map<Self, F>
1.0.0 · Source§fn filter<P>(self, predicate: P) -> Filter<Self, P>
fn filter<P>(self, predicate: P) -> Filter<Self, P>
1.0.0 · Source§fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F>
fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F>
1.0.0 · Source§fn enumerate(self) -> Enumerate<Self>where
Self: Sized,
fn enumerate(self) -> Enumerate<Self>where
Self: Sized,
1.0.0 · Source§fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
1.0.0 · Source§fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
1.57.0 · Source§fn map_while<B, P>(self, predicate: P) -> MapWhile<Self, P>
fn map_while<B, P>(self, predicate: P) -> MapWhile<Self, P>
1.0.0 · Source§fn skip(self, n: usize) -> Skip<Self>where
Self: Sized,
fn skip(self, n: usize) -> Skip<Self>where
Self: Sized,
n
elements. Read more1.0.0 · Source§fn take(self, n: usize) -> Take<Self>where
Self: Sized,
fn take(self, n: usize) -> Take<Self>where
Self: Sized,
n
elements, or fewer
if the underlying iterator ends sooner. Read more1.0.0 · Source§fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>
fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>
1.29.0 · Source§fn flatten(self) -> Flatten<Self>
fn flatten(self) -> Flatten<Self>
Source§fn map_windows<F, R, const N: usize>(self, f: F) -> MapWindows<Self, F, N>
fn map_windows<F, R, const N: usize>(self, f: F) -> MapWindows<Self, F, N>
iter_map_windows
)f
for each contiguous window of size N
over
self
and returns an iterator over the outputs of f
. Like slice::windows()
,
the windows during mapping overlap as well. Read more1.0.0 · Source§fn inspect<F>(self, f: F) -> Inspect<Self, F>
fn inspect<F>(self, f: F) -> Inspect<Self, F>
1.0.0 · Source§fn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
fn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
Iterator
. Read moreSource§fn try_collect<B>(
&mut self,
) -> <<Self::Item as Try>::Residual as Residual<B>>::TryType
fn try_collect<B>( &mut self, ) -> <<Self::Item as Try>::Residual as Residual<B>>::TryType
iterator_try_collect
)Source§fn collect_into<E>(self, collection: &mut E) -> &mut E
fn collect_into<E>(self, collection: &mut E) -> &mut E
iter_collect_into
)1.0.0 · Source§fn partition<B, F>(self, f: F) -> (B, B)
fn partition<B, F>(self, f: F) -> (B, B)
Source§fn partition_in_place<'a, T, P>(self, predicate: P) -> usize
fn partition_in_place<'a, T, P>(self, predicate: P) -> usize
iter_partition_in_place
)true
precede all those that return false
.
Returns the number of true
elements found. Read moreSource§fn is_partitioned<P>(self, predicate: P) -> bool
fn is_partitioned<P>(self, predicate: P) -> bool
iter_is_partitioned
)true
precede all those that return false
. Read more1.27.0 · Source§fn try_fold<B, F, R>(&mut self, init: B, f: F) -> R
fn try_fold<B, F, R>(&mut self, init: B, f: F) -> R
1.27.0 · Source§fn try_for_each<F, R>(&mut self, f: F) -> R
fn try_for_each<F, R>(&mut self, f: F) -> R
1.0.0 · Source§fn fold<B, F>(self, init: B, f: F) -> B
fn fold<B, F>(self, init: B, f: F) -> B
1.51.0 · Source§fn reduce<F>(self, f: F) -> Option<Self::Item>
fn reduce<F>(self, f: F) -> Option<Self::Item>
Source§fn try_reduce<R>(
&mut self,
f: impl FnMut(Self::Item, Self::Item) -> R,
) -> <<R as Try>::Residual as Residual<Option<<R as Try>::Output>>>::TryType
fn try_reduce<R>( &mut self, f: impl FnMut(Self::Item, Self::Item) -> R, ) -> <<R as Try>::Residual as Residual<Option<<R as Try>::Output>>>::TryType
iterator_try_reduce
)1.0.0 · Source§fn all<F>(&mut self, f: F) -> bool
fn all<F>(&mut self, f: F) -> bool
1.0.0 · Source§fn any<F>(&mut self, f: F) -> bool
fn any<F>(&mut self, f: F) -> bool
1.0.0 · Source§fn find<P>(&mut self, predicate: P) -> Option<Self::Item>
fn find<P>(&mut self, predicate: P) -> Option<Self::Item>
1.30.0 · Source§fn find_map<B, F>(&mut self, f: F) -> Option<B>
fn find_map<B, F>(&mut self, f: F) -> Option<B>
Source§fn try_find<R>(
&mut self,
f: impl FnMut(&Self::Item) -> R,
) -> <<R as Try>::Residual as Residual<Option<Self::Item>>>::TryType
fn try_find<R>( &mut self, f: impl FnMut(&Self::Item) -> R, ) -> <<R as Try>::Residual as Residual<Option<Self::Item>>>::TryType
try_find
)1.0.0 · Source§fn position<P>(&mut self, predicate: P) -> Option<usize>
fn position<P>(&mut self, predicate: P) -> Option<usize>
1.0.0 · Source§fn rposition<P>(&mut self, predicate: P) -> Option<usize>
fn rposition<P>(&mut self, predicate: P) -> Option<usize>
1.0.0 · Source§fn max(self) -> Option<Self::Item>
fn max(self) -> Option<Self::Item>
1.0.0 · Source§fn min(self) -> Option<Self::Item>
fn min(self) -> Option<Self::Item>
1.6.0 · Source§fn max_by_key<B, F>(self, f: F) -> Option<Self::Item>
fn max_by_key<B, F>(self, f: F) -> Option<Self::Item>
1.15.0 · Source§fn max_by<F>(self, compare: F) -> Option<Self::Item>
fn max_by<F>(self, compare: F) -> Option<Self::Item>
1.6.0 · Source§fn min_by_key<B, F>(self, f: F) -> Option<Self::Item>
fn min_by_key<B, F>(self, f: F) -> Option<Self::Item>
1.15.0 · Source§fn min_by<F>(self, compare: F) -> Option<Self::Item>
fn min_by<F>(self, compare: F) -> Option<Self::Item>
1.0.0 · Source§fn rev(self) -> Rev<Self>where
Self: Sized + DoubleEndedIterator,
fn rev(self) -> Rev<Self>where
Self: Sized + DoubleEndedIterator,
1.0.0 · Source§fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
1.36.0 · Source§fn copied<'a, T>(self) -> Copied<Self>
fn copied<'a, T>(self) -> Copied<Self>
Source§fn array_chunks<const N: usize>(self) -> ArrayChunks<Self, N>where
Self: Sized,
fn array_chunks<const N: usize>(self) -> ArrayChunks<Self, N>where
Self: Sized,
iter_array_chunks
)N
elements of the iterator at a time. Read more1.11.0 · Source§fn product<P>(self) -> P
fn product<P>(self) -> P
Source§fn cmp_by<I, F>(self, other: I, cmp: F) -> Ordering
fn cmp_by<I, F>(self, other: I, cmp: F) -> Ordering
iter_order_by
)Iterator
with those
of another with respect to the specified comparison function. Read more1.5.0 · Source§fn partial_cmp<I>(self, other: I) -> Option<Ordering>
fn partial_cmp<I>(self, other: I) -> Option<Ordering>
PartialOrd
elements of
this Iterator
with those of another. The comparison works like short-circuit
evaluation, returning a result without comparing the remaining elements.
As soon as an order can be determined, the evaluation stops and a result is returned. Read moreSource§fn partial_cmp_by<I, F>(self, other: I, partial_cmp: F) -> Option<Ordering>where
Self: Sized,
I: IntoIterator,
F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Option<Ordering>,
fn partial_cmp_by<I, F>(self, other: I, partial_cmp: F) -> Option<Ordering>where
Self: Sized,
I: IntoIterator,
F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Option<Ordering>,
iter_order_by
)Iterator
with those
of another with respect to the specified comparison function. Read moreSource§fn eq_by<I, F>(self, other: I, eq: F) -> bool
fn eq_by<I, F>(self, other: I, eq: F) -> bool
iter_order_by
)1.5.0 · Source§fn lt<I>(self, other: I) -> bool
fn lt<I>(self, other: I) -> bool
Iterator
are lexicographically
less than those of another. Read more1.5.0 · Source§fn le<I>(self, other: I) -> bool
fn le<I>(self, other: I) -> bool
Iterator
are lexicographically
less or equal to those of another. Read more1.5.0 · Source§fn gt<I>(self, other: I) -> bool
fn gt<I>(self, other: I) -> bool
Iterator
are lexicographically
greater than those of another. Read more1.5.0 · Source§fn ge<I>(self, other: I) -> bool
fn ge<I>(self, other: I) -> bool
Iterator
are lexicographically
greater than or equal to those of another. Read more1.82.0 · Source§fn is_sorted(self) -> bool
fn is_sorted(self) -> bool
1.82.0 · Source§fn is_sorted_by<F>(self, compare: F) -> bool
fn is_sorted_by<F>(self, compare: F) -> bool
1.82.0 · Source§fn is_sorted_by_key<F, K>(self, f: F) -> bool
fn is_sorted_by_key<F, K>(self, f: F) -> bool
Source§impl<C, D, R> MSDataFileMetadata for MZReaderType<R, C, D>where
C: CentroidLike + From<CentroidPeak> + BuildFromArrayMap,
D: DeconvolutedCentroidLike + From<DeconvolutedPeak> + BuildFromArrayMap,
R: Read + Seek,
impl<C, D, R> MSDataFileMetadata for MZReaderType<R, C, D>where
C: CentroidLike + From<CentroidPeak> + BuildFromArrayMap,
D: DeconvolutedCentroidLike + From<DeconvolutedPeak> + BuildFromArrayMap,
R: Read + Seek,
Source§fn data_processings(&self) -> &Vec<DataProcessing>
fn data_processings(&self) -> &Vec<DataProcessing>
DataProcessing
workflows applied to spectra in
this data file.Source§fn instrument_configurations(&self) -> &HashMap<u32, InstrumentConfiguration>
fn instrument_configurations(&self) -> &HashMap<u32, InstrumentConfiguration>
InstrumentConfiguration
modes that spectra
were acquired under.Source§fn file_description(&self) -> &FileDescription
fn file_description(&self) -> &FileDescription
Source§fn softwares(&self) -> &Vec<Software>
fn softwares(&self) -> &Vec<Software>
Software
applied to the data file to apply different
DataProcessing
methods.Source§fn samples(&self) -> &Vec<Sample>
fn samples(&self) -> &Vec<Sample>
Source§fn data_processings_mut(&mut self) -> &mut Vec<DataProcessing>
fn data_processings_mut(&mut self) -> &mut Vec<DataProcessing>
DataProcessing
list for this data fileSource§fn instrument_configurations_mut(
&mut self,
) -> &mut HashMap<u32, InstrumentConfiguration>
fn instrument_configurations_mut( &mut self, ) -> &mut HashMap<u32, InstrumentConfiguration>
InstrumentConfiguration
mapping for this data fileSource§fn file_description_mut(&mut self) -> &mut FileDescription
fn file_description_mut(&mut self) -> &mut FileDescription
FileDescription
description of the contents and the
sources for this mass spectrometry data file.Source§fn softwares_mut(&mut self) -> &mut Vec<Software>
fn softwares_mut(&mut self) -> &mut Vec<Software>
Software
of this data file.fn samples_mut(&mut self) -> &mut Vec<Sample>
Source§fn source_file_name(&self) -> Option<&str>
fn source_file_name(&self) -> Option<&str>
Source§fn run_description(&self) -> Option<&MassSpectrometryRun>
fn run_description(&self) -> Option<&MassSpectrometryRun>
MassSpectrometryRun
metadata record if it is availableSource§fn spectrum_count_hint(&self) -> Option<u64>
fn spectrum_count_hint(&self) -> Option<u64>
Source§fn copy_metadata_from(&mut self, source: &impl MSDataFileMetadata)where
Self: Sized,
fn copy_metadata_from(&mut self, source: &impl MSDataFileMetadata)where
Self: Sized,
MSDataFileMetadata
implementation into
this one.fn set_spectrum_count_hint(&mut self, _value: Option<u64>)
Source§fn run_description_mut(&mut self) -> Option<&mut MassSpectrometryRun>
fn run_description_mut(&mut self) -> Option<&mut MassSpectrometryRun>
MassSpectrometryRun
metadata record if it is availableSource§impl<C, D> MZFileReader<C, D> for MZReaderType<File, C, D>where
C: CentroidLike + From<CentroidPeak> + BuildFromArrayMap,
D: DeconvolutedCentroidLike + From<DeconvolutedPeak> + BuildFromArrayMap,
impl<C, D> MZFileReader<C, D> for MZReaderType<File, C, D>where
C: CentroidLike + From<CentroidPeak> + BuildFromArrayMap,
D: DeconvolutedCentroidLike + From<DeconvolutedPeak> + BuildFromArrayMap,
Source§fn construct_index_from_stream(&mut self) -> u64
fn construct_index_from_stream(&mut self) -> u64
Source§fn open_path<P>(path: P) -> Result<MZReaderType<File, C, D>, Error>
fn open_path<P>(path: P) -> Result<MZReaderType<File, C, D>, Error>
Source§impl<C, D, R> RandomAccessSpectrumIterator<C, D> for MZReaderType<R, C, D>where
C: CentroidLike + From<CentroidPeak> + BuildFromArrayMap,
D: DeconvolutedCentroidLike + From<DeconvolutedPeak> + BuildFromArrayMap,
R: Read + Seek,
impl<C, D, R> RandomAccessSpectrumIterator<C, D> for MZReaderType<R, C, D>where
C: CentroidLike + From<CentroidPeak> + BuildFromArrayMap,
D: DeconvolutedCentroidLike + From<DeconvolutedPeak> + BuildFromArrayMap,
R: Read + Seek,
Source§fn start_from_id(
&mut self,
id: &str,
) -> Result<&mut MZReaderType<R, C, D>, SpectrumAccessError>
fn start_from_id( &mut self, id: &str, ) -> Result<&mut MZReaderType<R, C, D>, SpectrumAccessError>
id
Source§fn start_from_index(
&mut self,
index: usize,
) -> Result<&mut MZReaderType<R, C, D>, SpectrumAccessError>
fn start_from_index( &mut self, index: usize, ) -> Result<&mut MZReaderType<R, C, D>, SpectrumAccessError>
index
Source§fn start_from_time(
&mut self,
time: f64,
) -> Result<&mut MZReaderType<R, C, D>, SpectrumAccessError>
fn start_from_time( &mut self, time: f64, ) -> Result<&mut MZReaderType<R, C, D>, SpectrumAccessError>
time
Source§impl<C, D, R> SpectrumSource<C, D> for MZReaderType<R, C, D>where
C: CentroidLike + From<CentroidPeak> + BuildFromArrayMap,
D: DeconvolutedCentroidLike + From<DeconvolutedPeak> + BuildFromArrayMap,
R: Read + Seek,
impl<C, D, R> SpectrumSource<C, D> for MZReaderType<R, C, D>where
C: CentroidLike + From<CentroidPeak> + BuildFromArrayMap,
D: DeconvolutedCentroidLike + From<DeconvolutedPeak> + BuildFromArrayMap,
R: Read + Seek,
Source§fn get_spectrum_by_id(&mut self, id: &str) -> Option<MultiLayerSpectrum<C, D>>
fn get_spectrum_by_id(&mut self, id: &str) -> Option<MultiLayerSpectrum<C, D>>
Source§fn get_spectrum_by_index(
&mut self,
index: usize,
) -> Option<MultiLayerSpectrum<C, D>>
fn get_spectrum_by_index( &mut self, index: usize, ) -> Option<MultiLayerSpectrum<C, D>>
Source§fn get_spectrum_by_time(
&mut self,
time: f64,
) -> Option<MultiLayerSpectrum<C, D>>
fn get_spectrum_by_time( &mut self, time: f64, ) -> Option<MultiLayerSpectrum<C, D>>
Source§fn get_index(&self) -> &OffsetIndex
fn get_index(&self) -> &OffsetIndex
Source§fn set_index(&mut self, index: OffsetIndex)
fn set_index(&mut self, index: OffsetIndex)
Source§fn detail_level(&self) -> &DetailLevel
fn detail_level(&self) -> &DetailLevel
DetailLevel
the reader currently usesSource§fn set_detail_level(&mut self, detail_level: DetailLevel)
fn set_detail_level(&mut self, detail_level: DetailLevel)
DetailLevel
for the reader, changing
the amount of work done immediately on loading a
spectrum. Read moreSource§fn len(&self) -> usize
fn len(&self) -> usize
fn is_empty(&self) -> bool
Source§fn _offset_of_index(&self, index: usize) -> Option<u64>
fn _offset_of_index(&self, index: usize) -> Option<u64>
Source§fn _offset_of_time(&mut self, time: f64) -> Option<u64>
fn _offset_of_time(&mut self, time: f64) -> Option<u64>
Source§fn iter(&mut self) -> SpectrumIterator<'_, C, D, S, Self> ⓘwhere
Self: Sized,
fn iter(&mut self) -> SpectrumIterator<'_, C, D, S, Self> ⓘwhere
Self: Sized,
Source§fn get_group_by_index(&mut self, index: usize) -> Option<SpectrumGroup<C, D, S>>where
Self: Sized,
fn get_group_by_index(&mut self, index: usize) -> Option<SpectrumGroup<C, D, S>>where
Self: Sized,
SpectrumGroup
from this sourceSource§fn groups(
&mut self,
) -> SpectrumGroupingIterator<SpectrumIterator<'_, C, D, S, Self>, C, D, S> ⓘwhere
Self: Sized,
fn groups(
&mut self,
) -> SpectrumGroupingIterator<SpectrumIterator<'_, C, D, S, Self>, C, D, S> ⓘwhere
Self: Sized,
Source§fn into_groups(self) -> SpectrumGroupingIterator<Self, C, D, S> ⓘwhere
Self: Sized,
fn into_groups(self) -> SpectrumGroupingIterator<Self, C, D, S> ⓘwhere
Self: Sized,
self
to create a SpectrumGroupingIterator
. This is ideal for non-rewindable streams
like io::stdin
which don’t implement io::Seek