Hi Woonghee,
is it possible to script and automate restricted peak picking in POKY? I divide the peaks in the reference spectrum into groups, each with different tolerances (see the attachment; I save the tolerances of each peak as a "Note"). However, for large proteins—like the one I’m currently working on (29 kDa)—the restricted picking for each group takes a very long time to complete.
I was wondering if it’s possible to write a script to do the restricted peak picking for all groups of peaks and let it run unattended for several hours.
Thank you in advance,Thomas
Thomas,
Sure, you can.
Let say your spectrum instance is called “spec”.
picked_peaks = spec.pick_peaks(region, height_threshholds, min_linewidth, min_dropoff)
So, in your case you can loop through regions.
Woonghee Lee, I.E.I.P., M.S., Ph.D.
Assistant Professor & Data Science and Chemistry Certificate Program Director
Department of Chemistry
University of Colorado Denver
1151 Arapahoe St. (Science Bldg.) Rm 4128A (office), Rm 4128 (dry lab), Rm 4133 (wet lab)
Denver, CO 80217-3364, USA
Office: +1-303-315-7672
https://poky.clas.ucdenver.edu
https://poky.clas.ucdenver.edu/wlee-group
https://clas.ucdenver.edu/chemistry/woonghee-lee
https://clas.ucdenver.edu/chemistry/data-science-and-chemistry-certificate
From:
nmr-s...@googlegroups.com <nmr-s...@googlegroups.com> on behalf of Thomas Evangelidis <tev...@aiffinity.com>
Date: Tuesday, April 8, 2025 at 12:21 PM
To: NMR POKY/SPARKY USER GROUP <nmr-s...@googlegroups.com>
Subject: [NMR POKY/SPARKY] Automating Restricted Peak Picking
[External Email - Use Caution] |
--
You received this message because you are subscribed to the Google Groups "NMR POKY/SPARKY USER GROUP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
nmr-sparky+...@googlegroups.com.
To view this discussion visit
https://groups.google.com/d/msgid/nmr-sparky/15ec8008-c848-4d6a-b693-82cd752bc323n%40googlegroups.com.
Thomas,
One reason the speed matters is that the screen updates every time picking for one region is done when you run through multiple regions. So that you can do a kind of “coarse grain (merging regions)” picking and filtering out unmatched peaks based on your tolerance for better performance. This needs some trials and errors to find the best settings.
Woonghee Lee, I.E.I.P., M.S., Ph.D.
Assistant Professor & Data Science and Chemistry Certificate Program Director
Department of Chemistry
University of Colorado Denver
1151 Arapahoe St. (Science Bldg.) Rm 4128A (office), Rm 4128 (dry lab), Rm 4133 (wet lab)
Denver, CO 80217-3364, USA
Office: +1-303-315-7672
https://poky.clas.ucdenver.edu
https://poky.clas.ucdenver.edu/wlee-group
https://clas.ucdenver.edu/chemistry/woonghee-lee
https://clas.ucdenver.edu/chemistry/data-science-and-chemistry-certificate
Hi Woonghee,
I’m attaching the updated “Restricted Peak Pick” plugin file, now enhanced to use custom tolerance values read from the Note of each peak.
I’ve added a toggle button labeled "Use tolerance values from 'Note'". When activated, the program iterates through each peak and performs restricted peak picking using the tolerance values specified in the Note field, which must follow this format:
<nucleus>=<float>, <nucleus>=<float>, ...
I’ve tested this on a 2D → 4D case, and it works correctly in both the new mode and the previous modes, producing consistent results. I haven’t tested it yet on 2D → 3D or 3D → 4D, but in principle, it should work.
Feel free to replace the existing python file if you'd like to include this in the main distribution.
Also, following your suggestion, I now perform restricted peak picking in two rounds. In the first round, I select about half of the 2D peaks (as shown in the screenshot). After selecting and removing irrelevant 4D peaks, I run the process again with the remaining 2D peaks. With this method and the new enhancement, the process has become really efficient!
Best regards,
Thomas
Dr. Thomas Evangelidis
CEO & CTO
Twitter: tevangelidis, LinkedIn: Thomas Evangelidis
Thank you Thomas. I will take a look.
Woonghee Lee, I.E.I.P., M.S., Ph.D.
Assistant Professor & Data Science and Chemistry Certificate Program Director
Department of Chemistry
University of Colorado Denver
1151 Arapahoe St. (Science Bldg.) Rm 4128A (office), Rm 4128 (dry lab), Rm 4133 (wet lab)
Denver, CO 80217-3364, USA
Office: +1-303-315-7672
https://poky.clas.ucdenver.edu
https://poky.clas.ucdenver.edu/wlee-group
https://clas.ucdenver.edu/chemistry/woonghee-lee
https://clas.ucdenver.edu/chemistry/data-science-and-chemistry-certificate