Combine two MSImagingArrays for further peak alignment

73 views
Skip to first unread message

Shuo Qian

unread,
Aug 22, 2024, 9:18:48 AM8/22/24
to Cardinal MSI Help
Hi Cardinal team,

Thank you for developing this excellent package. 

Currently we are trying to process two single-cell MALDI imaging experiments (1 control 1 treatment with the same instrument method). They were outputted from SciLS lab with *.imzML and *.ibd format and they can only be in MSImagingArrays structure. I would like to clarify first that we do not like to try m/z binning since the same molecule might be assigned to different bins due to the mass error among pixels/spectra. Therefore, we prefer using your function peakAlign() to align "m/z"s after feature detection by the function peakPick(), and those functions worked well on processing two individual experiments.

However, the aligned "m/z"s are not the same between two experiments. Thus, we would like to know if there is some way to firstly combine two experiments, then align m/z together. My idea is changing the experiment name to the same, and changing coordinates from one of the experiment, then combine them together as a new MSImagingArray. Could you please tell me if there is some codes/functions can achieve that? Please let me know your thoughts. Thanks.

Best,
Shuo

kbemis

unread,
Aug 23, 2024, 1:32:26 PM8/23/24
to Cardinal MSI Help
Hi Shuo,

You should be able to simply do c(obj1, obj2) with MSImagingArrays objects to combine them.

There is no need to change coordinates. The runNames() will be set based on the initial file names.

-Kylie

Shuo Qian

unread,
Aug 29, 2024, 3:28:38 PM8/29/24
to Cardinal MSI Help
Hi Kylie,

Thank you so much for your information. It worked. I have never thought that is this easy...
I have another small question about normalization: I noticed that after RMS normalization, the scale of values are quite small. Are they with log2 form or not? Also, if I would like to use "reference" normalization, besides selecting it, how can I add the reference m/z into the function?

Thanks,
Shuo

kbemis

unread,
Aug 29, 2024, 4:59:22 PM8/29/24
to Cardinal MSI Help
RMS only scales the spectra by the root-mean-square of their intensities so that all spectra have the same RMS.

Log transformation is not applied; you would need to apply that separately if you want to log-transform intensities, e.g.:

spectra(obj) <- log2(spectra(obj))

Internally, the rescaling for RMS and reference normalization are done using matter::rescale_rms() and matter::rescale_ref() internally.

The target scaling value is arbitrary--you can pass a value to 'scale' to change the resulting magnitude. MS intensities are relative, so the exact values are not meaningful outside of quantitation with a known standard.

You can pass the m/z-value of a known calibrant peak via 'ref' so that it is scaled to the same intensity for all spectra. (The peak must exist in all spectra.)

-Kylie

Shuo Qian

unread,
Aug 29, 2024, 5:10:54 PM8/29/24
to Cardinal MSI Help
Hi Kylie,

I will try what you mentioned, and thanks for your explanation.

Best,
Shuo

Reply all
Reply to author
Forward
0 new messages