qcxms / PlotMS

Plot program for QCxMS spectrum plotting
GNU Lesser General Public License v3.0
8 stars 7 forks source link

export formulas for each peak [improvement] #6

Open tobigithub opened 2 years ago

tobigithub commented 2 years ago

Hi, this is for plotms 5.1. Also placeholder for potential merges from our development side.

For mass spectrometry experts it is extremely important to know the molecular formulas of the observed fragments. Because QCxMS produces such information it should be exported as table or independent file, but better should put into the JDX file.

Input res file is attached qceims.res.txt: Here is an example output for JDX with accurate masses and formulas.

##TITLE=Theoretical in-silico spectrum (QCEIMS)
##JCAMP-DX=4.24
##DATA TYPE=MASS SPECTRUM
##XUNITS=M/Z
##YUNITS=RELATIVE INTENSITY
##NPOINTS=96
##PEAK TABLE=(XY..XY) 1
29.0027             24.02  "C1O1H1"
29.0139             48.39  "H1N2"
43.0296            119.68  "C1N2H3"
44.0329              1.27  "C1N2H3(iso)"
44.0500             23.83  "C2N1H6"
148.0524            21.94  "C9O2H8"
149.0557             2.13  "C9O2H8(iso)"
151.0759            46.38  "C9O2H11"
152.0792             4.46  "C9O2H11(iso)"
165.0664            22.15  "C8N2O2H9"
165.0915           305.85  "C10O2H13"
166.0697             1.89  "C8N2O2H9"
166.0949            32.62  "C10O2H13"
167.0958             1.36  "C10O2H13(iso)"
167.0982             1.63  "C10O2H13(iso)"
194.1181            21.50  "C11N1O2H16"
195.1214             2.56  "C11N1O2H16(iso)"
208.1337            42.46  "C12N1O2H18"
209.1371             5.61  "C12N1O2H18(iso)"
209.1415            63.70  "C12N1O2H19"
210.1449             8.41  "C12N1O2H19(iso)"
218.1181            42.10  "C13N1O2H16"
219.1214             5.94  "C13N1O2H16(iso)"
236.1650            20.75  "C14N1O2H22"
237.1684             3.19  "C14N1O2H22(iso)"
260.1650            99.50  "C16N1O2H22"
261.1684            17.42  "C16N1O2H22(iso)"
262.1717             1.49  "C16N1O2H22(iso)"
289.1916            19.97  "C17N2O2H25"
290.1949             3.75  "C17N2O2H25(iso)"
291.2072            20.00  "C17N2O2H27"
292.2106             3.71  "C17N2O2H27(iso)"
303.2072            59.35  "C18N2O2H27"
304.2106            11.68  "C18N2O2H27(iso)"
304.2150            19.79  "C18N2O2H28"
305.2139             1.15  "C18N2O2H27"
305.2184             3.89  "C18N2O2H28"
318.2307            39.13  "C19N2O2H30"
319.2340             8.15  "C19N2O2H30(iso)"
393.2542            55.09  "C25N2O2H33"
394.2575            14.90  "C25N2O2H33(iso)"
395.2609             2.03  "C25N2O2H33(iso)"
411.2647            36.62  "C25N2O3H35"
411.2760            18.41  "C24N4O2H35"
412.2681             9.92  "C25N2O3H35"
412.2725            18.31  "C25N2O3H36"
412.2793             4.78  "C24N4O2H35"
413.2714             1.36  "C25N2O3H35"
413.2759             4.96  "C25N2O3H36"
423.2647            36.23  "C26N2O3H35"
424.2681            10.20  "C26N2O3H35(iso)"
424.2725            18.34  "C26N2O3H36"
425.2714             1.45  "C26N2O3H35"
425.2759             5.16  "C26N2O3H36"
425.2804           108.70  "C26N2O3H37"
426.2756            18.25  "C25N3O3H36"
426.2837            30.63  "C26N2O3H37"
427.2790             4.94  "C25N3O3H36"
427.2871             4.32  "C26N2O3H37"
427.2960            18.10  "C26N2O3H39"
428.2800            36.28  "C26N1O4H38"
428.2994             5.11  "C26N2O3H39"
429.2753            18.27  "C25N2O4H37"
429.2834            10.24  "C26N1O4H38"
430.2786             4.95  "C25N2O4H37"
430.2867             1.43  "C26N1O4H38"
439.2596            18.08  "C26N2O4H35"
440.2630             5.09  "C26N2O4H35(iso)"
440.2675            18.38  "C26N2O4H36"
441.2708             5.17  "C26N2O4H36(iso)"
441.2753            18.07  "C26N2O4H37"
442.2786             5.09  "C26N2O4H37(iso)"
451.2709            17.99  "C26N4O3H35"
452.2742             5.06  "C26N4O3H35(iso)"
453.2753           107.23  "C27N2O4H37"
454.2786            31.42  "C27N2O4H37(iso)"
454.2831            89.36  "C27N2O4H38"
455.2820             4.63  "C27N2O4H37"
455.2865            26.15  "C27N2O4H38"
455.2909          1000.00  "C27N2O4H39"
456.2880             7.15  "C27N2O4H39(iso)"
456.2898             3.82  "C27N2O4H38"
456.2943           293.65  "C27N2O4H39"
456.2952             1.70  "C27N2O4H39(iso)"
456.2972             4.55  "C27N2O4H39(iso)"
457.2913             2.05  "C27N2O4H39(iso)"
457.2952             7.89  "C27N2O4H39(iso)"
457.2976            42.92  "C27N2O4H39(iso)"
457.3006             1.53  "C27N2O4H39(iso)"
458.2985             2.52  "C27N2O4H39(iso)"
458.3010             3.62  "C27N2O4H39(iso)"
481.2814            17.73  "C27N4O4H37"
482.2848             5.20  "C27N4O4H37(iso)"
483.2971            35.48  "C27N4O4H39"
484.3004            10.42  "C27N4O4H39(iso)"
485.3038             1.52  "C27N4O4H39(iso)"
##END=
hechth commented 8 months ago

+1 on this issue and I'm pretty sure I have seen some QCxMS output some time which was in CSV form with these tables included. Did you follow up on this @tobigithub ?

tobigithub commented 8 months ago

@hechth I think we have a modified version or a parser for the output with formulas and also added a number of elements, @Shunyang2018 can you make the modified plotms repository public and post the link here? Basically we just parsed the res file added a few other elements and added the formulas to each line. This is similar to NIST23 MS/MS database output and extremely helpful because it confirms the formula for each calculated product ion, instead of having a mass error included.

Shunyang2018 commented 8 months ago

Sure, I'm happy to help! Here is the public link: https://github.com/Shunyang2018/plot_msms_accurate I used a dictionary to save and update the formulas and intensities while parsing the .res file. Please let me know if you need more details!

Shunyang

On Fri, Oct 20, 2023 at 3:24 PM Tobias Kind @.***> wrote:

@hechth https://github.com/hechth I think we have a modified version or a parser for the output with formulas and also added a number of elements, @Shunyang2018 https://github.com/Shunyang2018 can you make the modified plotms repository public and post the link here? Basically we just parsed the res file added a few other elements and added the formulas to each line. This is similar to NIST23 MS/MS database output and extremely helpful because it confirms the formula for each calculated product ion, instead of having a mass error included.

— Reply to this email directly, view it on GitHub https://github.com/qcxms/PlotMS/issues/6#issuecomment-1773465501, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHIS4TIT5EZHUVRZWZMJNBDYAL2YLAVCNFSM5B2THELKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCNZXGM2DMNJVGAYQ . You are receiving this because you were mentioned.Message ID: @.***>

-- Shunyang Wang Scientist, Computational Metabolomics @.***

brightseedbio.com https://www.linkedin.com/company/brightseedinc/ https://www.instagram.com/brightseed/ https://twitter.com/BrightseedBio

hechth commented 8 months ago

Maybe we can try to feed these improvements back upstream and make a pull request to the repo here?