Skip to content

Commit

Permalink
FIX: timscompress updates
Browse files Browse the repository at this point in the history
  • Loading branch information
sander-willems-bruker committed Jan 14, 2025
1 parent 6b16ce9 commit 8cad158
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/io/readers/frame_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@ impl FrameReader {
let sql_frames = SqlFrame::from_sql_reader(&tdf_sql_reader)?;
let tdf_bin_reader = TdfBlobReader::new(&path)?;
#[cfg(feature = "timscompress")]
let compressed_reader = CompressedTdfBlobReader::new(&path)
.ok_or_else(|| FrameReaderError::TimscompressError)?;
let compressed_reader = CompressedTdfBlobReader::new(
&path.as_ref().to_path_buf().join("analysis.tdf_bin"),
)
.ok_or_else(|| FrameReaderError::TimscompressError)?;
let acquisition = if sql_frames.iter().any(|x| x.msms_type == 8) {
AcquisitionType::DDAPASEF
} else if sql_frames.iter().any(|x| x.msms_type == 9) {
Expand Down Expand Up @@ -189,7 +191,8 @@ impl FrameReader {
let offset = self.get_binary_offset(index);
let raw_frame = self
.compressed_reader
.get_raw_frame_data(offset, self.scan_count);
.get_raw_frame_data(offset, self.scan_count)
.ok_or_else(|| FrameReaderError::TimscompressError)?;
frame.tof_indices = raw_frame.tof_indices;
frame.intensities = raw_frame.intensities;
frame.scan_offsets = raw_frame.scan_offsets;
Expand Down

0 comments on commit 8cad158

Please sign in to comment.