Open ranabanik opened 3 years ago
Ah, I was already wondering what you guys wanted to do with IMS, coming rather from the MRI field 😃
Indeed, pIMZ assumes that all spectra (in all slides) do have a common mz-range. This makes the life in the analysis much easier, but obviously does not meet reality of the machines.
However, there are several means implemented to circumvent this problem. First, you can call peaks (to_called_peaks
), second, you can interpolate your signal (interpolate_data
). Otherwise, most IMS machines offer to export raw- or binned spectra when exporting to imzML.
You can contact me at joppich at bio.ifi.lmu.de any time, but beware that in Europe the teaching season just started 😉
Thanks, Markus, I have mailed you.
And about to_called_peaks
following this here.
sp2_called, sp2_called_masses = imze.to_called_peaks(np.array([[avg_region_spectrum]]),
imze.mzValues,
resolution=4)
But I think there is size mismatch with errors:
File "/home/banikr2/PycharmProjects/pIMZ/pIMZ/imzml.py", line 1015, in to_called_peaks
assert(len(masses) == region.shape[2])
get_avg_spectrum
generates 1D tuple, where to_called_peaks
expects region
to be a 3D matrix.
I will try calculating avg spectrum over the pixels/scans.
But how to resolve it?
Hello Markus, It may be difficult for me to explain this as an amateur MSI data analyst. But I will try:
Different spectrum/specID has different numbers of unique m/z values. Though total mzvalues are the same throughout the imze image.
My question is how do I get 2D spatial images for a given or fixed m/z value on different sections/slices of spinal image. According to the data I am working with the m/z values seem to be restricted/ranged within 506~2000 for MALDI-ToF imaging for all slices of the spine.
Thanks a lot.