Package net.sf.mzmine.data

Examples of net.sf.mzmine.data.ChromatographicPeak


    return columnNames.length;
  }

  public Object getValueAt(int row, int col) {
    Object value = null;
    ChromatographicPeak peak = peaks.get(row);
    switch (col) {
      case (0) :
        value = peak.getDataFile().getName();
        break;
      case (1) :
        value = mzFormat.format(peak.getMZ());
        break;
      case (2) :
        value = rtFormat.format(peak.getRT());
        break;
      case (3) :
        value = intensityFormat.format(peak.getHeight());
        break;
      case (4) :
        value = intensityFormat.format(peak.getArea());
        break;
    }

    return value;
  }
View Full Code Here


    Range mzRange = null, rtRange = null;

    // Check the peaks for selected data files
    for (RawDataFile dataFile : dataFiles) {
      ChromatographicPeak peak = peakListRow.getPeak(dataFile);
      if (peak == null)
        continue;
      if ((mzRange == null) || (rtRange == null)) {
        mzRange = new Range(peak.getRawDataPointsMZRange());
        rtRange = new Range(peak.getRawDataPointsRTRange());
      } else {
        mzRange.extendRange(peak.getRawDataPointsMZRange());
        rtRange.extendRange(peak.getRawDataPointsRTRange());
      }

    }

    // If none of the data files had a peak, check the whole row
    if (mzRange == null) {
      for (ChromatographicPeak peak : peakListRow.getPeaks()) {
        if (peak == null)
          continue;
        if ((mzRange == null) || (rtRange == null)) {
          mzRange = new Range(peak.getRawDataPointsMZRange());
          rtRange = new Range(peak.getRawDataPointsRTRange());
        } else {
          mzRange.extendRange(peak.getRawDataPointsMZRange());
          rtRange.extendRange(peak.getRawDataPointsRTRange());
        }

      }
    }
View Full Code Here

    if (pattern != null) {
      isotopes = pattern.getDataPoints();
    } else {
      isotopes = new DataPoint[1];
      ChromatographicPeak bestPeak = row.getBestPeak();
      isotopes[0] = new SimpleDataPoint(bestPeak.getMZ(),
          bestPeak.getHeight());
    }

    try {
      FileWriter fileWriter = new FileWriter(outputFile);
      BufferedWriter writer = new BufferedWriter(fileWriter);
View Full Code Here

    if ((outputFile == null) || (massListName == null))
      return;

    // Best peak always exists, because peak list row has at least one peak
    ChromatographicPeak bestPeak = row.getBestPeak();

    // Get the MS/MS scan number
    int msmsScanNumber = bestPeak.getMostIntenseFragmentScanNumber();
    if (msmsScanNumber < 1) {
      MZmineCore.getDesktop().displayErrorMessage(
          "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() + ")");
      return;
    }

    DataPoint peaks[] = massList.getDataPoints();
View Full Code Here

TOP

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

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.