-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature: add
referenceParamGroup
inference for `instrumentConfigura…
…tion` when writing mzML, and escape newlines in `Param` values
- Loading branch information
1 parent
5632a2f
commit eb5f4dc
Showing
2 changed files
with
300 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
use std::env; | ||
use std::io; | ||
|
||
use mzdata::prelude::*; | ||
use mzdata::mz_read; | ||
|
||
fn main() -> io::Result<()> { | ||
env_logger::init(); | ||
let inpath = env::args().nth(1).unwrap_or_else(|| { | ||
eprintln!("Please provide a path to read an MS data file from, or '-'"); | ||
std::process::exit(1) | ||
}); | ||
|
||
let configs = mz_read!(inpath, reader => { | ||
reader.instrument_configurations().clone() | ||
})?; | ||
|
||
for (k, config) in configs.iter() { | ||
println!("Configuration ID: {k}"); | ||
for component in config.components.iter() { | ||
println!("\t{:?} -> {}\n", component.component_type, component.order); | ||
for p in component.params() { | ||
println!("\t{p}"); | ||
} | ||
} | ||
for p in config.params() { | ||
println!("{p}"); | ||
} | ||
} | ||
|
||
Ok(()) | ||
} |
Oops, something went wrong.