yguitton / metaMS

data processing for MS-based metabolomics
15 stars 3 forks source link

Todo MSP Parser #28

Open yguitton opened 4 years ago

yguitton commented 4 years ago

Todo: add a parser for MSP files generated by MoNa or Riken, Golm Todo: add additional Tags in metaMS identification outputs

example Riken MSP NAME: CITRIC ACID-TETRA-TMS; EI-B; MS EXACTMASS: 480.1851098 FORMULA: C18H40O7Si4 SMILES: CSi(C)OC(=O)CC(CC(=O)OSi(C)C)(OSi(C)C)C(=O)OSi(C)C ONTOLOGY: Tricarboxylic acids and derivatives INCHIKEY: VFGAVMGYDWDESE-UHFFFAOYSA-N RETENTIONTIME: -1 RETENTIONINDEX: 1788.907 QUANTMASS: 75 IONMODE: Positive COLLISIONENERGY: 70eV LICENSE: CC BY-SA Comment: Num Peaks: 141

YonghuiDong commented 3 years ago

The peak information is misisng In your example MSP file.

In case you are interested, you can refer to the code from @yufree to read MSP files from MoNa or Riken, https://github.com/yufree/enviGCMS/blob/c458d9458c9348fc62b31caaf1f19bbf111aff15/R/io.R#L112-L158

Yonghui Dong

valpalgal commented 2 weeks ago

I tried to read in a NIST .MSP file and got the following error: Error in read.compound(huhn[starts[i]:ends[i]], noNumbers = noNumbers) : No spectrum found

When I look at the MSP file though, there is a line called "Num Peaks:" that should be detected based on what I'm seeing in the read.msp function for metaMS.

yguitton commented 6 days ago

Hi @valpalgal

There are different "flavours" of NIST .msp spectra files depending on the software/lab used to generate ir. can you share on file with me?

Best