Image processing and Signal processing: one trimeric arm of a dodecamer of SP-D

OK,  before anything…. the bottom line of this post is — if i can dial in smoothing, threshold, amplitude characteristics into a signal processing program, and if i can dial in blur and filtering and threshold in image processing…. how do i come up with a value for the peak detection along a plot of a trimer of a dodecamer of SP-D and not have it reflect my bias and preconceived notion of how many peaks should be there.

All the time i spent searching out the best image processing programs corelDRAW(x5, and 19), corelPhotopaint (x5, and 19), Photoshop 6, and Photoshop2021. GIMP, Paint.net, Gwyddion, ImageJ, Octave, Inkscape (i am sure there are dozens more i could have tried) i kept wondering how I would describe each of the filters and masks in terms of reproducible science.  There are so many variations in contrast and focus and resolution and magnification in each image (I am grateful for the AFM images of SP-D, produced mostly by Arroyo et al, but also other authors to use to investigate this problem) that there was no single approach that leveled the “image processing” field. Each image was its own unique entity, therefore each processed to meet what I felt was a visual concensus, aka, my personal bias (not that my bias is bad, or out of line, or wrong…. i just was looking for some way to provide meaningful and honest results).

I began thinking about signal processing as an alternative to my manipulating the images in imaging programs (which btw produced some rather spectacular results in enhancing detail and removing unwanted background etc… this is not new information) but it wasn’t what I was looking to do). So after some help from Thomas O’Haver, and my two sons (both programmers), I have come to conclude that signal processing is actually no closer to producing unbiased data than image processing.  In fact… its pretty clear that they do similar things, and if i were any kind of a whiz at numbers… i would be able to find the algorithms for image and signal processing both, and compare how similar they really are.

One difference I will say, is that I have not been able to find an image processing program that will increase the number of peaks in a plot of a trimeric arm of SP-D plotted in imageJ no matter how much i have processed it from 9 or 10 peaks to 35 peaks, which some signal processing will do.  This kind of dramatic increase in peak numbers with signal processing is probably not a relevant application for looking at peaks along a tracing of a micrograph.

There is an excel template (Thomas O’Haver) called PeakDetection which I have used to analyze just a single trimer of a dodecamer.  images below are from that process beginning with the specifics that are used to detect the peaks — (Amplitude Threshold 0.6, Slope Threshold 2.5. (0 0 0 -3 -4 -3 -2 -1 0 1 2 3). Here is the plot of my excel data using those parameters.   This figure shows you the plot, with the peak markers in that excel template with my data. The box shows the line as 1000 little circles, so the first thing for a usable plot for vector manipulation is to change string of circles to a single line. I added the peak positions above the “squares” that mark the peak.


I have not found where the area, height and peak width are in this program, but it is an easy move to take the excel file and paste it into CorelDRAW as a metafile and change parameters, drop down the valley to valley margins. The peak at the left was not read as a peak but certainly is one (as it marks the highest peak, the center N termini junction of the dodecamer, but i traced just to the center of that high peak. So the pink area at the right is the other “half” of the N termini junction of the four trimers that make up one SP-D dodecamer.  I do not kno why the initial peak (representing the CTD portion of the trimer on the right) was not numbered, it is added as pink as well.

The evaluation of peak area i also did in CorelDRAW using the entire rectangle that bounds valley to valley in each peak.  The center “smoothing” area is just a dragdown from the original plot in excel and matches the orange boxes that are produced using the PeakDetectionTemplate.

Two more edits, and a reasonable assessment of peak area can be produced, i should have done peak height and peak width at this time as well… and will do. Next step will be to compare what i find here (my pedestrian method of finding peak area that I got from the excel template), with what I can get automatically from Octave programs (also Thomas O’Haver’s  peak finding functions written for Octave and Matlab).

Here i manually deleted the corner grid squares and changed the area number to match… it is not a perfect solution, but I bet it will be close. The far right peak has been doubled to accomodate the downslope on the other side of the N termini junction of the four SP-D trimers.  Peak on the far left is the CRD, peaks on the right (270 and 308) are my best estimate of the glycosylation site (where the little blip in the plot which produces two peaks is the result of the twisting of the trimer, which would displace the glycosyl groups from each other just a little –perhaps (just thinking outloud here).  This particular plot shows really nicely that there are likely four peaks between the glycosylation site, and the neck and CRD.  One missing peak is a tiny one that I expect to show up on the upslope to the N termini junction peak at the four places that the trimers join.  The large red 1 and the +9 represent the peak count total, with the red 1 being a peak not counted in this xlsx template -likely just because I don’t know how to set it up, no fault of the template.

and just for laughts here is a link to the first attempt at calling out the number of peaks along a hexamer and measuring peak area.  NB, plot above is HALF a single hexamer…. . I hope i have improved.

One additional plot — same ImageJ tracing and plot as SP-D arm above, no image processing and no signal processing. Looks pretty similar doesnt it.  Last image is a whole hexamer….  the green peak is whole, corresponding to the right hand orange peak in the image above it, which needs a mirror peak to complete it.