Package net.sf.mzmine.data

Examples of net.sf.mzmine.data.ChromatographicPeak


    PeakDataSet peakDataSet = (PeakDataSet) dataset;
    PeakDataPoint dataPoint = peakDataSet.getDataPoint(series, item);

    PeakList peakList = peakDataSet.getPeakList();
    ChromatographicPeak peak = peakDataSet.getPeak(series);
    PeakListRow row = peakList.getPeakRow(peak);
    double rtValue = dataPoint.getRT();
    double intValue = dataPoint.getIntensity();
    double mzValue = dataPoint.getMZ();
    int scanNumber = dataPoint.getScanNumber();

    String toolTip = "Peak: " + peak + "\nStatus: " + peak.getPeakStatus()
        + "\nPeak list row: " + row + "\nScan #" + scanNumber
        + "\nRetention time: " + rtFormat.format(rtValue) + "\nm/z: "
        + mzFormat.format(mzValue) + "\nIntensity: "
        + intensityFormat.format(intValue);
View Full Code Here


      return null;
    SimplePeakList newList = new SimplePeakList(selectedPeakList.getName(),
        selectedPeakList.getRawDataFiles());

    for (PeakListRow peakRow : selectedPeakList.getRows()) {
      ChromatographicPeak peak = peakRow.getPeak(dataFile);
      if (peak == null)
        continue;
      if (peak.getRawDataPointsIntensityRange().getMax() > intensity) {
        newList.addRow(peakRow);
      }
    }
    return newList;
  }
View Full Code Here

        1024, 1024);
    Vector<PeakDataPoint[]> processedPeakDataPoints = new Vector<PeakDataPoint[]>(
        1024, 1024);
    Vector<PeakDataPoint> thisPeakDataPoints = new Vector<PeakDataPoint>();

    ChromatographicPeak allPeaks[] = peakList.getPeaks(dataFile);

    for (ChromatographicPeak peak : allPeaks) {

      int scanNumbers[] = peak.getScanNumbers();
View Full Code Here

    newPanel.setBackground(bgColor);

    if (value instanceof ChromatographicPeak) {

      ChromatographicPeak peak = (ChromatographicPeak) value;
      double maxHeight = 0;

      PeakShapeNormalization norm = parameters.getParameter(
          PeakListTableParameters.peakShapeNormalization).getValue();
      if (norm == null)
        norm = PeakShapeNormalization.ROWMAX;
      switch (norm) {
        case GLOBALMAX :
          maxHeight = peakList.getDataPointMaxIntensity();
          break;
        case ROWMAX :
          int rowNumber = peakList.getPeakRowNum(peak);
          maxHeight = peakList.getRow(rowNumber)
              .getDataPointMaxIntensity();
          break;
        default :
          maxHeight = peak.getRawDataPointsIntensityRange().getMax();
          break;
      }

      PeakXICComponent xic = new PeakXICComponent(peak, maxHeight);
View Full Code Here

    } else {

      DataFileColumnType dataFileColumn = getDataFileColumn(col);
      RawDataFile file = getColumnDataFile(col);
      ChromatographicPeak peak = peakListRow.getPeak(file);

      if (peak == null) {
        if (dataFileColumn == DataFileColumnType.STATUS)
          return PeakStatus.UNKNOWN;
        else
          return null;
      }

      switch (dataFileColumn) {
        case STATUS :
          return peak.getPeakStatus();
        case PEAKSHAPE :
          return peak;
        case MZ :
          return new Double(peak.getMZ());
        case RT :
          return new Double(peak.getRT());
        case HEIGHT :
          return new Double(peak.getHeight());
        case AREA :
          return new Double(peak.getArea());
        case DURATION :
          return new Double(peak.getRawDataPointsRTRange().getSize());
        case CHARGE :
          if (peak.getCharge() <= 0)
            return null;
          return new Integer(peak.getCharge());
      }

    }

    return null;
View Full Code Here

    if (dataset instanceof PeakListDataSet) {

      PeakListDataSet peakListDataSet = (PeakListDataSet) dataset;

      ChromatographicPeak peak = peakListDataSet.getPeak(series, item);

      PeakList peakList = peakListDataSet.getPeakList();
      PeakListRow row = peakList.getPeakRow(peak);

      String tooltip = "Peak: " + peak + "\nStatus: "
          + peak.getPeakStatus() + "\nPeak list row: " + row
          + "\nData point m/z: " + mzFormat.format(mzValue)
          + "\nData point intensity: "
          + intensityFormat.format(intValue);

      return tooltip;
View Full Code Here

    return parameter.getName() + ": " + parameterValue;
  }

  public double getValue(PeakListRow row) {
    if (file != null) {
      ChromatographicPeak peak = row.getPeak(file);
      if (peak == null)
        return 0;
      else
        return peak.getArea();
    }

    double totalArea = 0;
    int numOfFiles = 0;
    for (RawDataFile dataFile : row.getRawDataFiles()) {
      Object fileValue = MZmineCore.getCurrentProject()
          .getParameterValue(parameter, dataFile);
      if (fileValue == parameterValue) {
        ChromatographicPeak peak = row.getPeak(dataFile);
        if ((peak != null) && (peak.getArea() > 0)) {
          totalArea += peak.getArea();
          numOfFiles++;
        }
      }
    }
    if (numOfFiles == 0)
View Full Code Here

   * Returns all peaks for a raw data file
   */
  public ChromatographicPeak[] getPeaks(RawDataFile rawDataFile) {
    Vector<ChromatographicPeak> peakSet = new Vector<ChromatographicPeak>();
    for (int row = 0; row < getNumberOfRows(); row++) {
      ChromatographicPeak p = peakListRows.get(row).getPeak(rawDataFile);
      if (p != null)
        peakSet.add(p);
    }
    return peakSet.toArray(new ChromatographicPeak[0]);
  }
View Full Code Here

      throws IOException {

    currentRow = row;

    // Determine peak charge.
    final ChromatographicPeak bestPeak = row.getBestPeak();
    int charge = bestPeak.getCharge();
    if (charge <= 0) {
      charge = 1;
    }

    // Calculate mass value.
    final double massValue = (row.getAverageMZ() - ionType.getAddedMass())
        * (double) charge;

    // Isotope pattern.
    final IsotopePattern rowIsotopePattern = bestPeak.getIsotopePattern();

    // Process each one of the result ID's.
    final String[] findCompounds = gateway.findCompounds(massValue,
        mzTolerance, numOfResults, db.getParameterSet());
    for (int i = 0; !isCanceled() && i < findCompounds.length; i++) {
View Full Code Here

    }

    // MS/MS evaluation is slowest, so let's do it last
    Double msmsScore = null;
    ChromatographicPeak bestPeak = peakListRow.getBestPeak();
    RawDataFile dataFile = bestPeak.getDataFile();
    Map<DataPoint, String> msmsAnnotations = null;
    int msmsScanNumber = bestPeak.getMostIntenseFragmentScanNumber();

    if ((checkMSMS) && (msmsScanNumber > 0)) {
      Scan msmsScan = dataFile.getScan(msmsScanNumber);
      String massListName = msmsParameters.getParameter(
          MSMSScoreParameters.massList).getValue();
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.