Package net.sf.mzmine.util

Examples of net.sf.mzmine.util.DataPointSorter


    double noiseLevel = parameters.getParameter(
        ExactMassDetectorParameters.noiseLevel).getValue();

    // Create a tree set of detected mzPeaks sorted by MZ in ascending order
    TreeSet<ExactMzDataPoint> mzPeaks = new TreeSet<ExactMzDataPoint>(
        new DataPointSorter(SortingProperty.MZ,
            SortingDirection.Ascending));

    // Create a tree set of candidate mzPeaks sorted by intensity in
    // descending order.
    TreeSet<ExactMzDataPoint> candidatePeaks = new TreeSet<ExactMzDataPoint>(
        new DataPointSorter(SortingProperty.Intensity,
            SortingDirection.Descending));

    // First get all candidate peaks (local maximum)
    getLocalMaxima(scan, candidatePeaks, noiseLevel);
View Full Code Here


    double maxIntensity = 0;

    DataPoint searchMZ = new SimpleDataPoint(mzRange.getMin(), 0);
    int startMZIndex = Arrays.binarySearch(dataPoints, searchMZ,
        new DataPointSorter(SortingProperty.MZ,
            SortingDirection.Ascending));
    if (startMZIndex < 0)
      startMZIndex = (startMZIndex * -1) - 1;

    if (startMZIndex >= dataPoints.length)
View Full Code Here

  public void addScan(RawDataFile dataFile, int scanNumber,
      DataPoint mzValues[]) {

    // Sort m/z peaks by descending intensity
    Arrays.sort(mzValues, new DataPointSorter(SortingProperty.Intensity,
        SortingDirection.Descending));

    // Set of already connected chromatograms in each iteration
    Set<Chromatogram> connectedChromatograms = new LinkedHashSet<Chromatogram>();
View Full Code Here

    double maximumMZPeakWidth = parameters.getParameter(
        RecursiveMassDetectorParameters.maximumMZPeakWidth).getValue();

    DataPoint dataPoints[] = scan.getDataPoints();
    TreeSet<DataPoint> mzPeaks = new TreeSet<DataPoint>(
        new DataPointSorter(SortingProperty.MZ,
            SortingDirection.Ascending));

    // Find MzPeaks
    recursiveThreshold(mzPeaks, dataPoints, 1, dataPoints.length - 1,
        noiseLevel, minimumMZPeakWidth, maximumMZPeakWidth, 0);
View Full Code Here

   */
  private DataPoint[] getMzPeaks(double noiseLevel,
      DataPoint[] originalDataPoints, DataPoint[] waveletDataPoints) {

    TreeSet<DataPoint> mzPeaks = new TreeSet<DataPoint>(
        new DataPointSorter(SortingProperty.MZ,
            SortingDirection.Ascending));

    Vector<DataPoint> rawDataPoints = new Vector<DataPoint>();
    int peakMaxInd = 0;
    int stopInd = waveletDataPoints.length - 1;
View Full Code Here

      mergedDataPoints.add(negativeDP);
    }
    DataPoint mergedDPArray[] = mergedDataPoints.toArray(new DataPoint[0]);

    // Sort the merged data points by m/z
    Arrays.sort(mergedDPArray, new DataPointSorter(SortingProperty.MZ,
        SortingDirection.Ascending));

    // Iterate the merged data points and sum all isotopes within m/z
    // tolerance
    for (int i = 0; i < mergedDPArray.length - 1; i++) {
View Full Code Here

    if (peakModel == null)
      return mzPeaks;

    // Create a tree set of detected mzPeaks sorted by MZ in ascending order
    TreeSet<DataPoint> finalMZPeaks = new TreeSet<DataPoint>(
        new DataPointSorter(SortingProperty.MZ,
            SortingDirection.Ascending));

    // Create a tree set of candidate mzPeaks sorted by intensity in
    // descending order.
    TreeSet<DataPoint> candidatePeaks = new TreeSet<DataPoint>(
        new DataPointSorter(SortingProperty.Intensity,
            SortingDirection.Descending));
    candidatePeaks.addAll(Arrays.asList(mzPeaks));

    while (candidatePeaks.size() > 0) {
View Full Code Here

TOP

Related Classes of net.sf.mzmine.util.DataPointSorter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.