Skip to content

Commit

Permalink
FEAT: added timscompressiontype to metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
sander-willems-bruker committed Jul 3, 2024
1 parent 2207459 commit 149cfab
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/io/readers/metadata_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,17 @@ impl MetadataReader {
let tdf_sql_reader = SqlReader::open(&sql_path).unwrap();
let sql_metadata: HashMap<String, String> =
SqlMetadata::from_sql_reader(&tdf_sql_reader).unwrap();
let compression_type = sql_metadata
.get("TimsCompressionType")
.unwrap()
.parse()
.unwrap();
Metadata {
path: path.as_ref().to_path_buf(),
rt_converter: get_rt_converter(&tdf_sql_reader),
im_converter: get_im_converter(&sql_metadata, &tdf_sql_reader),
mz_converter: get_mz_converter(&sql_metadata),
compression_type,
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/ms_data/acquisition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
pub enum AcquisitionType {
DDAPASEF,
DIAPASEF,
// DiagonalDIAPASEF,
DiagonalDIAPASEF,
// PRMPASEF,
/// Default value.
#[default]
Expand Down
1 change: 1 addition & 0 deletions src/ms_data/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ pub struct Metadata {
pub rt_converter: Frame2RtConverter,
pub im_converter: Scan2ImConverter,
pub mz_converter: Tof2MzConverter,
pub compression_type: u8,
}

0 comments on commit 149cfab

Please sign in to comment.