Change the error message to a warning
@@ -34,6 +34,7 @@ import net.sf.mzmine.datamodel.RawDataFile;
import net.sf.mzmine.datamodel.Scan;
import net.sf.mzmine.datamodel.impl.SimplePeakList;
import net.sf.mzmine.datamodel.impl.SimplePeakListRow;
+import net.sf.mzmine.main.MZmineCore;
import net.sf.mzmine.modules.peaklistmethods.qualityparameters.QualityParameters;
import net.sf.mzmine.parameters.ParameterSet;
import net.sf.mzmine.parameters.parametertypes.selectors.ScanSelection;
@@ -179,7 +180,6 @@ public class ADAPChromatogramBuilderTask extends AbstractTask {
}
// Check if the scans are MS1-only or MS2-only.
-
int minMsLevel = Arrays.stream(scans)
.mapToInt(Scan::getMSLevel)
.min()
@@ -191,10 +191,10 @@ public class ADAPChromatogramBuilderTask extends AbstractTask {
.orElseThrow(() -> new IllegalStateException("Cannot find the maximum MS level"));
if (minMsLevel != maxMsLevel) {
- setStatus(TaskStatus.ERROR);
- setErrorMessage("Only scans of one MS level should be used for building chromatograms. " +
+ MZmineCore.getDesktop().displayMessage(null,
+ "MZmine thinks that you are running ADAP Chromatogram builder on both MS1- and MS2-scans. " +
+ "This will likely produce wrong results. " +
"Please, set the scan filter parameter to a specific MS level");
- return;
}
