Package net.sf.mzmine.data

Examples of net.sf.mzmine.data.PeakList


      });
      dataFiles.addAll(Arrays.asList(files));
    }

    // Produce new PeakList
    PeakList peakList = new SimplePeakList("Mass Candidates",
        dataFiles.toArray(new RawDataFile[dataFiles.size()]));

    // Start the comparison task to filter and sort the candidate masses
    SpectraMatcherComparisonTask comparisonTask = new SpectraMatcherComparisonTask(
        processingTasks, parameters, massCandidatesByFile, peakList);
View Full Code Here


        return a.getName().compareTo(b.getName());
      }
    });

    // Produce new PeakList
    PeakList peakList = new SimplePeakList(
        "Retention Index Correction Results",
        dataFiles.toArray(new RawDataFile[dataFiles.size()]));

    // Create PeakListRows
    int id = 0;

    for (String name : FameData.FAME_NAMES) {
      PeakListRow row = new SimplePeakListRow(++id);
      row.setComment(name);

      for (FameAlignmentProcessingTask task : processingTasks) {
        if (task.getResults().containsKey(name))
          row.addPeak(task.getResults().get(name).getDataFile(), task
              .getResults().get(name));
      }

      peakList.addRow(row);
    }

    // Add table to the GUI
    ResultsListTableWindow window = new ResultsListTableWindow(peakList);
    MZmineCore.getDesktop().addInternalFrame(window);
View Full Code Here

        currentLoadedObjectName = fileMatcher.group(2);

        InputStream peakListStream = zipFile.getInputStream(entry);

        PeakList newPeakList = peakListOpenHandler
            .readPeakList(peakListStream);

        newProject.addPeakList(newPeakList);
      }
View Full Code Here

  @Override
  protected void addDialogComponents() {

    super.addDialogComponents();

    PeakList peakLists[] = MZmineCore.getCurrentProject().getPeakLists();
    if (peakLists.length < 2)
      return;

    PeakList selectedPeakLists[] = MZmineCore.getDesktop()
        .getSelectedPeakLists();

    // Preview check box
    previewCheckBox = new JCheckBox("Show preview of RANSAC alignment");
    previewCheckBox.addActionListener(this);
View Full Code Here

    return alignMol;
  }

  private void updatePreview() {

    PeakList peakListX = (PeakList) peakListsComboX.getSelectedItem();
    PeakList peakListY = (PeakList) peakListsComboY.getSelectedItem();

    if ((peakListX == null) || (peakListY == null))
      return;

    // Select the rawDataFile which has more peaks in each peakList
    int numPeaks = 0;
    RawDataFile file = null;
    RawDataFile file2 = null;

    for (RawDataFile rfile : peakListX.getRawDataFiles()) {
      if (peakListX.getPeaks(rfile).length > numPeaks) {
        numPeaks = peakListX.getPeaks(rfile).length;
        file = rfile;
      }
    }
    numPeaks = 0;
    for (RawDataFile rfile : peakListY.getRawDataFiles()) {
      if (peakListY.getPeaks(rfile).length > numPeaks) {
        numPeaks = peakListY.getPeaks(rfile).length;
        file2 = rfile;
      }
    }

    // Update the parameter set from dialog components
    updateParameterSetFromComponents();

    // Check the parameter values
    ArrayList<String> errorMessages = new ArrayList<String>();
    boolean parametersOK = super.parameterSet
        .checkAllParameterValues(errorMessages);
    if (!parametersOK) {
      StringBuilder message = new StringBuilder(
          "Please check the parameter settings:\n\n");
      for (String m : errorMessages) {
        message.append(m);
        message.append("\n");
      }
      MZmineCore.getDesktop().displayMessage(message.toString());
      return;
    }

    // Ransac Alignment
    Vector<AlignStructMol> list = this.getVectorAlignment(peakListX,
        peakListY, file, file2);
    RANSAC ransac = new RANSAC(super.parameterSet);
    ransac.alignment(list);

    // Plot the result
    this.chart.removeSeries();
    this.chart.addSeries(list,
        peakListX.getName() + " vs " + peakListY.getName(),
        super.parameterSet.getParameter(RansacAlignerParameters.Linear)
            .getValue());
    this.chart.printAlignmentChart(peakListX.getName() + " RT",
        peakListY.getName() + " RT");

  }
View Full Code Here

  }

  @Override
  public ExitCode showSetupDialog() {

    PeakList selectedPeakList[] = getParameter(peakList).getValue();
    PeakListRow rowChoices[];
    if (selectedPeakList.length == 1) {
      rowChoices = selectedPeakList[0].getRows();
    } else {
      rowChoices = new PeakListRow[0];
View Full Code Here

  @Override
  @Nonnull
  public ExitCode runModule(@Nonnull ParameterSet parameters,
      @Nonnull Collection<Task> tasks) {

    PeakList peakLists[] = parameters.getParameter(
        StandardCompoundNormalizerParameters.peakList).getValue();
    for (PeakList peakList : peakLists) {
      Task newTask = new StandardCompoundNormalizerTask(peakList,
          parameters);
      tasks.add(newTask);
View Full Code Here

    ExitCode exitCode = BatchModeModule.runBatch(batchFile);
    assert (exitCode == ExitCode.OK);

    assert (MZmineCore.getCurrentProject().getPeakLists().length > 0);

    PeakList peakList = MZmineCore.getCurrentProject().getPeakLists()[0];
    assert (peakList.getNumberOfRows() > 0);

    logger.info("Set #1 Mass Candidates: " + peakList.getNumberOfRows());

    for (PeakListRow row : peakList.getRows()) {
      assert (row.getNumberOfPeaks() > 0);
      assert (row.getRawDataFiles().length > 0);
      assert (row.getNumberOfPeaks() > 0);

      for (ChromatographicPeak p : row.getPeaks()) {
View Full Code Here

        alignment.addRow(row);

      }
    }

    PeakList curAlignment = alignment;
    return curAlignment;
  }
View Full Code Here

    ExitCode exitCode = BatchModeModule.runBatch(batchFile);
    assert (exitCode == ExitCode.OK);

    assert (MZmineCore.getCurrentProject().getPeakLists().length > 0);

    PeakList peakList = MZmineCore.getCurrentProject().getPeakLists()[0];
    assert (peakList.getNumberOfRows() > 0);

    logger.info("Set #2 Mass Candidates: " + peakList.getNumberOfRows());

    for (PeakListRow row : peakList.getRows()) {
      assert (row.getNumberOfPeaks() > 0);
      assert (row.getRawDataFiles().length > 0);
      assert (row.getNumberOfPeaks() > 0);

      for (ChromatographicPeak p : row.getPeaks()) {
View Full Code Here

TOP

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

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.