Skip to content

Commit

Permalink
Don't overwrite targets as the result is often inferior.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mailaender committed Feb 24, 2022
1 parent bd4fe9d commit 894d88e
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,11 @@ public IChromatogramMSD parseChromatogram(String chromatogramPath, String pathRe
* Peak identifier
* The settings are not needed by the CALRI peak identifier.
*/
PeakIdentifier peakIdentifier = new PeakIdentifier();
IPeakIdentifierSettingsMSD peakIdentifierSettings = null;
peakIdentifier.identify(peaks, peakIdentifierSettings, monitor);
if(peaks.stream().allMatch(p -> p.getTargets().isEmpty())) {
PeakIdentifier peakIdentifier = new PeakIdentifier();
IPeakIdentifierSettingsMSD peakIdentifierSettings = null;
peakIdentifier.identify(peaks, peakIdentifierSettings, monitor);
}
chromatogramSelectionMSD.getChromatogram().setDirty(true);
} catch(Exception e) {
logger.error(e.getLocalizedMessage(), e);
Expand Down

0 comments on commit 894d88e

Please sign in to comment.