Get M/Z values in a msheatmap/msdotplot overlay with a pixel pseudocolor value greater than 120 (the range is 0 - 195)?
Show older comments
I have an LCMS acquisition with 1897 time variables and a varying range of M/Z variables. The mzXML file was imported using 'mzXMLread' which works well.
I used the 'mzxml2peaks' function to get the M/Z spectrum for each of the 1987 time variables and a time vector for my file, which works well.
I saved my data in a struct like 'newdata' with the fields 'peaks', 'time', which is all thats needed to visualise the data. Peaks can be accessed via 'newdata(1).peaks' and
the time vector can be accessed via 'newdata(1).time'.
Next I proceeded with the steps as mentioned in the msdotplot help section
[MZ,Y] = msppresample(newdata(1).peaks,5000);
msheatmap(MZ,newdata(1).time,log(Y))
after which, I overlayed this heatmap with the dotplot to highlight features of interest
msdotplot(newdata(1).peaks,newdata(1).time,'Quantile',0.95)
axis([400 1700 903 1626])
where, 400 to 1700 is the x axis (M/Z range) and 903 to 1626 is the y axis (time range). This is the range I am interested in seeing.
I have attached the resulting figure as 'Figure n1.png' which gets me a pseudocolor range of values [0 195].
I am interested to get the x axis coordinates (and exact M/Z values) of those pixels whose color value is greater than 120. I have been scrambling to use functions like findobj, get, set, gca, gcf but couldnt quite get it working. I also tried imtool, but imtool compresses the image and appears to lose the actual X and Y data. Furthermore, there appear to be too many pixels to pick by hand.
Can someone point me to the right direction for this please, I would be obliged? Thank you.

Accepted Answer
More Answers (0)
Categories
Find more on Display 2-D Images in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!