Package net.sf.mzmine.data

Examples of net.sf.mzmine.data.Scan


    totalScans = scanNumbers.length;

    // Check if we have at least one scan with a mass list of given name
    boolean haveMassList = false;
    for (int i = 0; i < totalScans; i++) {
      Scan scan = dataFile.getScan(scanNumbers[i]);
      MassList massList = scan.getMassList(massListName);
      if (massList != null) {
        haveMassList = true;
        break;
      }
    }
    if (!haveMassList) {
      setStatus(TaskStatus.ERROR);
      this.errorMessage = dataFile.getName()
          + " has no mass list called '" + massListName + "'";
      return;
    }

    // Process all scans
    for (int i = 0; i < totalScans; i++) {

      if (isCanceled())
        return;

      Scan scan = dataFile.getScan(scanNumbers[i]);

      MassList massList = scan.getMassList(massListName);

      // Skip those scans which do not have a mass list of given name
      if (massList == null) {
        processedScans++;
        continue;
      }

      DataPoint mzPeaks[] = massList.getDataPoints();

      DataPoint newMzPeaks[] = ShoulderPeaksFilter.filterMassValues(
          mzPeaks, parameters);

      SimpleMassList newMassList = new SimpleMassList(massListName + " "
          + suffix, scan, newMzPeaks);

      scan.addMassList(newMassList);

      // Remove old mass list
      if (autoRemove)
        scan.removeMassList(massList);

      processedScans++;
    }

    setStatus(TaskStatus.FINISHED);
View Full Code Here


          "There is no MS/MS scan for peak " + bestPeak);
      return;
    }

    // MS/MS scan must exist, because msmsScanNumber was > 0
    Scan msmsScan = bestPeak.getDataFile().getScan(msmsScanNumber);

    MassList massList = msmsScan.getMassList(massListName);
    if (massList == null) {
      MZmineCore.getDesktop().displayErrorMessage(
          "There is no mass list called " + massListName
              + " for MS/MS scan #" + msmsScanNumber + " ("
              + bestPeak.getDataFile() + ")");
View Full Code Here

TOP

Related Classes of net.sf.mzmine.data.Scan

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.