Hi, I am trying to convert a NIST msp library file to mgf format and am having trouble. When I drag and drop the .msp file, I get the following error- see attached for more details in the error
Unhandled exception has occurred in a component of your application...Object reference not set to an instance of an object.
When I open my .msp file with notepad, this is the format of entries:
NAME:Metabolitexyz
COMMENT:
RI:2281.90
CASNO:RT 23.705
RT: 23.705
AKS: 329
( 53 2) ( 54 4) ( 55 5) ( 56 2) ( 57 2)
( 58 5) ( 59 27) ( 60 2) ( 61 3) ( 65 1)
( 66 1) ( 67 2) ( 68 1) ( 69 4) ( 70 3)
( 73 1000) ( 74 129) ( 75 82) ( 76 4) ( 77 2)
( 79 1) ( 80 1) ( 81 2) ( 82 4) ( 83 2)
( 84 11) ( 85 6) ( 86 2) ( 87 5) ( 89 60)
( 90 5) ( 91 3) ( 94 1) ( 97 2) ( 98 3)
( 99 6) (100 17) (101 56) (103 203) (104 21)
(105 17) (106 2) (107 1) (109 1) (110 1)
(111 3) (113 12) (114 11) (115 9) (116 27)
(117 41) (118 6) (119 10) (120 1) (121 2)
(125 2) (126 4) (127 8) (129 127) (130 21)
(131 37) (133 117) (134 16) (135 14) (136 2)
(137 2) (138 1) (139 1) (140 3) (141 6)
(142 11) (143 18) (144 4) (145 6) (147 346)
(148 60) (149 41) (150 5) (151 6) (152 2)
(153 3) (154 4) (155 4) (157 138) (158 22)
(159 13) (160 2) (161 5) (163 12) (164 2)
(165 2) (166 1) (167 2) (168 3) (169 9)
(170 5) (172 33) (173 21) (174 9) (175 6)
(176 1) (177 4) (178 2) (179 2) (180 3)
(181 5) (182 2) (183 2) (184 2) (185 2)
(186 3) (187 4) (189 24) (191 34) (192 7)
(193 12) (195 11) (196 3) (197 3) (198 3)
(199 2) (200 5) (201 10) (202 11) (204 79)
(205 42) (206 14) (207 30) (208 7) (209 7)
(211 72) (212 12) (213 8) (214 11) (215 12)
(217 217) (218 61) (219 25) (220 5) (221 13)
(222 3) (223 2) (225 31) (227 27) (228 27)
(229 29) (230 22) (231 19) (232 7) (233 6)
(234 2) (235 4) (236 1) (237 1) (238 1)
(240 6) (241 7) (243 23) (244 10) (245 5)
(246 4) (247 11) (248 3) (249 2) (251 1)
(253 6) (254 3) (255 4) (256 5) (257 3)
(258 2) (259 7) (260 8) (262 56) (263 15)
(264 6) (265 2) (266 2) (267 2) (268 8)
(269 10) (270 4) (271 2) (272 1) (273 4)
(274 3) (275 4) (276 1) (277 2) (278 1)
(280 1) (281 1) (283 13) (284 8) (285 16)
(286 5) (287 3) (288 6) (289 3) (291 12)
(292 3) (293 2) (295 1) (299 405) (300 112)
(301 61) (302 16) (303 6) (304 3) (305 11)
(306 4) (307 8) (308 2) (309 2) (310 1)
(311 2) (313 17) (315 325) (316 91) (317 51)
(318 15) (319 26) (320 8) (321 4) (322 1)
(328 19) (329 7) (331 84) (332 28) (333 17)
(334 6) (335 2) (336 1) (341 24) (342 8)
(343 6) (344 4) (345 3) (346 2) (347 4)
(348 3) (349 1) (350 1) (354 1) (355 3)
(357 295) (358 88) (359 46) (360 10) (361 3)
(362 1) (363 1) (364 2) (365 1) (369 10)
(371 7) (373 16) (374 6) (375 3) (376 6)
(377 2) (378 1) (381 1) (383 2) (384 1)
(387 807) (388 336) (389 202) (390 51) (391 16)
(392 3) (393 1) (403 18) (404 8) (405 4)
(406 1) (415 3) (416 1) (417 2) (418 1)
(419 1) (420 1) (428 1) (429 2) (430 1)
(431 3) (432 1) (433 1) (434 1) (442 4)
(443 5) (444 3) (445 2) (446 1) (447 1)
(448 1) (455 5) (456 2) (457 2) (459 6)
(460 3) (461 10) (462 5) (463 3) (464 1)
(467 2) (468 1) (471 140) (472 55) (473 32)
(474 9) (475 3) (476 1) (477 1) (478 1)
(492 1) (494 5) (495 2) (496 1) (499 1)
(517 1) (529 1) (530 1) (535 1) (536 1)
(538 1) (561 3) (562 2) (563 1)
Is this in a format that the converter accepts? I ask because I wasn't able to open this file with the MSP librarian app. Would be grateful for any help!
Hi,
Thanks for taking the time to use this program.
I can see what is wrong, it is all to do with the very loose definition of msp format.
In brief your file doesn't comply, but the program handles that badly.
If you have a look at this program's wiki page then it explains a bit about it.
https://sourceforge.net/p/msp-librarian/wiki/Edit%20Entry/
You can also take your msp file and drag it into MSP Librarian and you'll see the errors (after a fashion).
In yours it only contains Name: You have AKS: instead of Num Peaks:
Here's how you fix it.
Use Notepad++
https://notepad-plus-plus.org/
It is a million times better than Notepad
1. Add two blank lines at the end of the file. Note: blocks of data must be separated with a blank line too
The next steps are all using the Find/Replace
2. Replace AKS with Num Peaks
3. Replace all ( with nothing. Which is another way of saying delete all (
4. Replace all ) with , or you could use ; just not )
Thanks, that was VERY helpful! I used the MSP Librarian to check for line wise errors and Notepad++ to correct them. Really. appreciate you creating these software and also providing support.
Fixed, after a fashion. v1.3 doesn't crash, but it isn't clever enough to know that the data is all the wrong format. You'll have to wait for the AI powered version for that - which might be a long time in coming.