Skip to content

Commit

Permalink
CHORE: simplified bruker spectrum reader config
Browse files Browse the repository at this point in the history
  • Loading branch information
sander-willems-bruker committed Sep 4, 2024
1 parent 492acdb commit dd171a3
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions crates/sage-cloudpath/src/tdf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ use sage_core::{
mass::Tolerance,
spectrum::{Precursor, RawSpectrum, Representation},
};
use serde::{Deserialize, Serialize};
use timsrust::readers::SpectrumReaderConfig;
pub use timsrust::readers::SpectrumReaderConfig as BrukerSpectrumProcessor;

pub struct TdfReader;

Expand All @@ -17,7 +16,7 @@ impl TdfReader {
) -> Result<Vec<RawSpectrum>, timsrust::TimsRustError> {
let spectrum_reader = timsrust::readers::SpectrumReader::build()
.with_path(path_name.as_ref())
.with_config(bruker_spectrum_processor.spectrum_reader_config)
.with_config(bruker_spectrum_processor)
.finalize()?;
let spectra: Vec<RawSpectrum> = (0..spectrum_reader.len())
.into_par_iter()
Expand Down Expand Up @@ -67,8 +66,3 @@ impl TdfReader {
precursor
}
}

#[derive(Clone, Copy, Serialize, Deserialize, Default)]
pub struct BrukerSpectrumProcessor {
pub spectrum_reader_config: SpectrumReaderConfig,
}

0 comments on commit dd171a3

Please sign in to comment.