Package net.sf.mzmine.data

Examples of net.sf.mzmine.data.ChromatographicPeak


    double[][] rawData = new double[selectedRawDataFiles.length][selectedRows.length];
    for (int rowIndex = 0; rowIndex < selectedRows.length; rowIndex++) {
      PeakListRow peakListRow = selectedRows[rowIndex];
      for (int fileIndex = 0; fileIndex < selectedRawDataFiles.length; fileIndex++) {
        RawDataFile rawDataFile = selectedRawDataFiles[fileIndex];
        ChromatographicPeak p = peakListRow.getPeak(rawDataFile);
        if (p != null) {
          if (useArea)
            rawData[fileIndex][rowIndex] = p.getArea();
          else
            rawData[fileIndex][rowIndex] = p.getHeight();
        }
      }
    }

    int numComponents = xAxisDimension;
View Full Code Here


      IsotopePattern predictedPattern = formula.getPredictedIsotopes();

      if (predictedPattern == null)
        return;

      ChromatographicPeak peak = peakListRow.getBestPeak();

      RawDataFile dataFile = peak.getDataFile();
      int scanNumber = peak.getRepresentativeScanNumber();
      SpectraVisualizerModule.showNewSpectrumWindow(dataFile, scanNumber,
          null, peak.getIsotopePattern(), predictedPattern);

    }

    if (command.equals("SHOW_MSMS")) {

      ChromatographicPeak bestPeak = peakListRow.getBestPeak();

      RawDataFile dataFile = bestPeak.getDataFile();
      int msmsScanNumber = bestPeak.getMostIntenseFragmentScanNumber();

      if (msmsScanNumber < 1)
        return;

      SpectraVisualizerWindow msmsPlot = SpectraVisualizerModule
View Full Code Here

        // if necessary
        for (int row = 0; row < peakList.getNumberOfRows(); row++) {
          PeakListRow sourceRow = peakList.getRow(row);
          PeakListRow newRow = processedPeakList.getRow(row);

          ChromatographicPeak sourcePeak = sourceRow
              .getPeak(dataFile);

          if (sourcePeak == null) {

            // Create a new gap
View Full Code Here

          datafile2 = peakList.getRawDataFile(masterSample);
        }
        RegressionInfo info = new RegressionInfo();

        for (PeakListRow row : peakList.getRows()) {
          ChromatographicPeak peaki = row.getPeak(datafile1);
          ChromatographicPeak peake = row.getPeak(datafile2);
          if (peaki != null && peake != null) {
            info.addData(peake.getRT(), peaki.getRT());
          }
        }

        info.setFunction();

        // Canceled?
        if (isCanceled()) {
          return;
        }

        Vector<Gap> gaps = new Vector<Gap>();

        // Fill each row of this raw data file column, create new empty
        // gaps
        // if necessary
        for (int row = 0; row < peakList.getNumberOfRows(); row++) {
          PeakListRow sourceRow = peakList.getRow(row);
          PeakListRow newRow = processedPeakList.getRow(row);

          ChromatographicPeak sourcePeak = sourceRow
              .getPeak(datafile1);

          if (sourcePeak == null) {

            // Create a new gap
View Full Code Here

    double[][] rawData = new double[selectedRawDataFiles.length][selectedRows.length];
    for (int rowIndex = 0; rowIndex < selectedRows.length; rowIndex++) {
      PeakListRow peakListRow = selectedRows[rowIndex];
      for (int fileIndex = 0; fileIndex < selectedRawDataFiles.length; fileIndex++) {
        RawDataFile rawDataFile = selectedRawDataFiles[fileIndex];
        ChromatographicPeak p = peakListRow.getPeak(rawDataFile);
        if (p != null) {
          if (useArea)
            rawData[fileIndex][rowIndex] = p.getArea();
          else
            rawData[fileIndex][rowIndex] = p.getHeight();
        }
      }
    }

    int numComponents = xAxisDimension;
View Full Code Here

      PeakListRow row = alignedPeakList.getRow(rowIndex);

      // Collect available peak intensities for selected files
      Vector<Double> groupOnePeakIntensities = new Vector<Double>();
      for (int fileIndex = 0; fileIndex < groupOneFiles.length; fileIndex++) {
        ChromatographicPeak p = row.getPeak(groupOneFiles[fileIndex]);
        if (p != null) {
          if (measurementType == PeakMeasurementType.AREA)
            groupOnePeakIntensities.add(p.getArea());
          else
            groupOnePeakIntensities.add(p.getHeight());
        }
      }
      Vector<Double> groupTwoPeakIntensities = new Vector<Double>();
      for (int fileIndex = 0; fileIndex < groupTwoFiles.length; fileIndex++) {
        ChromatographicPeak p = row.getPeak(groupTwoFiles[fileIndex]);
        if (p != null) {
          if (measurementType == PeakMeasurementType.AREA)
            groupTwoPeakIntensities.add(p.getArea());
          else
            groupTwoPeakIntensities.add(p.getHeight());
        }
      }

      // If there are at least one measurement from each group for this
      // peak then calc logratio and include this peak in the plot
View Full Code Here

    Arrays.sort(sortedPeaks, new PeakSorter(SortingProperty.Height,
        SortingDirection.Descending));

    // Loop through all peaks
    totalPeaks = sortedPeaks.length;
    ChromatographicPeak oldPeak;

    for (int ind = 0; ind < totalPeaks; ind++) {

      if (isCanceled())
        return;

      oldPeak = sortedPeaks[ind];

      if (oldPeak.getHeight() >= minimumHeight) {
        ChromatographicPeak newPeak = this.getExtendedPeak(oldPeak);
        // Get previous pekaListRow
        PeakListRow oldRow = peakList.getPeakRow(oldPeak);

        // keep old ID
        int oldID = oldRow.getID();
View Full Code Here

        // Canceled?
        if (isCanceled())
          return;

        // Get current peak
        ChromatographicPeak currentPeak = sourceRow.getPeak(column);

        // If there is a gap, try to fill it
        if (currentPeak == null)
          currentPeak = fillGap(sourceRow, column);
View Full Code Here

    Range mzRange = null, rtRange = null;

    // Check the peaks for selected data files
    for (RawDataFile dataFile : row.getRawDataFiles()) {
      ChromatographicPeak peak = row.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());
      }
    }

    assert mzRange != null;
    assert rtRange != null;
View Full Code Here

   *      int, int)
   */
  public String generateToolTip(CategoryDataset dataset, int row, int column) {
    Format intensityFormat = MZmineCore.getConfiguration()
        .getIntensityFormat();
    ChromatographicPeak peaks[] = ((IntensityPlotDataset) dataset)
        .getPeaks(row, column);
    RawDataFile files[] = ((IntensityPlotDataset) dataset).getFiles(column);

    StringBuffer sb = new StringBuffer();
    for (int i = 0; i < files.length; i++) {
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.