use of dulab.adap.datamodel.BetterComponent in project mzmine2 by mzmine.
the class ADAP3DecompositionV2SetupDialog method shapeCluster.
/**
* Cluster list of PeakInfo based on the chromatographic shapes
*/
private void shapeCluster() {
ChromatogramPeakPair chromatogramPeakPair = cboPeakLists.getItemAt(cboPeakLists.getSelectedIndex());
if (chromatogramPeakPair == null)
return;
PeakList chromatogramList = chromatogramPeakPair.chromatograms;
PeakList peakList = chromatogramPeakPair.peaks;
if (chromatogramList == null || peakList == null)
return;
final RetTimeClusterer.Cluster cluster = cboClusters.getItemAt(cboClusters.getSelectedIndex());
if (cluster == null)
return;
Double retTimeTolerance = parameterSet.getParameter(ADAP3DecompositionV2Parameters.RET_TIME_TOLERANCE).getValue();
Boolean adjustApexRetTime = parameterSet.getParameter(ADAP3DecompositionV2Parameters.ADJUST_APEX_RET_TIME).getValue();
Integer minClusterSize = parameterSet.getParameter(ADAP3DecompositionV2Parameters.MIN_CLUSTER_SIZE).getValue();
if (retTimeTolerance == null || retTimeTolerance <= 0.0 || adjustApexRetTime == null || minClusterSize == null || minClusterSize <= 0)
return;
List<BetterPeak> chromatograms = new ADAP3DecompositionV2Utils().getPeaks(chromatogramList);
List<BetterComponent> components = null;
try {
components = new ComponentSelector().execute(chromatograms, cluster, retTimeTolerance, adjustApexRetTime, minClusterSize);
} catch (Exception e) {
e.printStackTrace();
}
if (components != null)
// chromatograms
retTimeIntensityPlot.updateData(chromatograms, components);
}
Aggregations