Open AlanRace opened 3 years ago
I see your point. I could remove the immediate.
argument but than it is not clear for which spectrum the warning was thrown. You are right that for imzML datasets a collected warning once per dataset would be more helpful but for other datasets every spectrum could contain different errors.
Does suppressWarnings(importImzMl(file))
works for you?
I have been evaluating multiple imzML parsers (see here https://imzml.github.io/) with publicly available imzML datasets (e.g. https://metaspace2020.eu/datasets?ds=2017-06-30_07h26m26s) and experienced some issues with MALDIquantForeign.
It seems that if a common 'error' is encountered for each spectrum, then this will flood the console with one message per spectrum (which for MSI Data is a lot!) eventually leading to a system crash. The error for the dataset linked above is given below. Perhaps it would be possible to just display the warning once per dataset, rather than per spectrum?