config
#
The purpose of this command is to take a peak list in .csv format that the user provides and translate it to the YAML format supported by this package.
PTR-TOF mass spectrometry generates data that might be interpreted in a variety of ways depending on the experiment set-up. The reagent that is used as the ionization source, as well as the calibration of the instrument, might both affect the exact m/z value at which a compound’s signal is detected. For this reason, the user must provide a configuration file to guide the data processing. This config file is in a readable YAML format that looks like this:
name: example-peak-list
author: Johnny Appleseed
peak-list:
- mf: H2O
smiles: O
mass-range:
min: 19.016
max: 19.02
- mf: C2H2
smiles: C#C
mass-range:
min: 27.021
max: 27.025
There are 4 different inputs to describe each peak in the mass spectrum:
mf
– molecular formulasmiles
– SMILES (Simplified Molecular Input Line Entry System) string, provided for substructure matching purposes. (learn more)mass-range / min
– m/z lower bound on peak integrationmass-range / max
– m/z upper bound on peak integration
Creating this configuration file is made easy by the config command. The user must provide a .csv (or .feather) FILE in any of the 3 following formats:
ion |
min |
max |
---|---|---|
C6H7+ |
79.048 |
79.06 |
mf |
min |
max |
---|---|---|
C6H6 |
79.048 |
79.06 |
mf |
smiles |
min |
max |
---|---|---|---|
C6H6 |
CC=C=CC#C |
79.048 |
79.06 |
Note on Molecular Identifiers
To read about the thoughts that went into these three formats, and their key differences, see more.
Also name
and author
can be passed directly to the config command using the --name
and --author
options.
Below is an example command where ion_peaks.csv, a file in the format of #1 above, is transformed into a YAML peak list saved to my_peak_list.yml.
$ tofspec config -o my_peak_list.yml --ion ion_peaks.csv