Package net.sf.mzmine.parameters

Examples of net.sf.mzmine.parameters.ParameterSet


    if (src == comboBox) {
      if (selected == null) {
        setButton.setEnabled(false);
        return;
      }
      ParameterSet parameterSet = selected.getParameterSet();
      int numOfParameters = parameterSet.getParameters().length;
      setButton.setEnabled(numOfParameters > 0);
    }

    if (src == setButton) {
      if (selected == null)
        return;
      ParameterSet parameterSet = selected.getParameterSet();
      parameterSet.showSetupDialog();
    }

  }
View Full Code Here


        initializedModules.put(moduleClass, moduleInstance);

        // Create an instance of parameter set
        Class<? extends ParameterSet> parameterSetClass = moduleInstance
            .getParameterSetClass();
        ParameterSet parameterSetInstance = parameterSetClass
            .newInstance();

        // Add the parameter set to the configuration
        configuration
            .setModuleParameters((Class<MZmineModule>) moduleClass,
View Full Code Here

  public BatchQueue clone() {

    // Clone the parameters.
    final BatchQueue clonedQueue = new BatchQueue();
    for (final MZmineProcessingStep<MZmineProcessingModule> step : this) {
      final ParameterSet parameters = step.getParameterSet();
      final MZmineProcessingStepImpl<MZmineProcessingModule> stepCopy = new MZmineProcessingStepImpl<MZmineProcessingModule>(
          step.getModule(), parameters.cloneParameter());
      clonedQueue.add(stepCopy);
    }
    return clonedQueue;
  }
View Full Code Here

  private void updateSystemProxySettings() {
    // Update system proxy settings
    Boolean proxyEnabled = getParameter(proxySettings).getValue();
    if ((proxyEnabled != null) && (proxyEnabled)) {
      ParameterSet proxyParams = getParameter(proxySettings)
          .getEmbeddedParameters();
      String address = proxyParams.getParameter(
          ProxySettings.proxyAddress).getValue();
      String port = proxyParams.getParameter(ProxySettings.proxyPort)
          .getValue();
      System.setProperty("http.proxySet", "true");
      System.setProperty("http.proxyHost", address);
      System.setProperty("http.proxyPort", port);
    } else {
View Full Code Here

   * @param row
   *            the peak list row.
   */
  public static void showSingleRowIdentificationDialog(final PeakListRow row) {

    final ParameterSet parameters = new SingleRowIdentificationParameters();

    // Set m/z.
    parameters.getParameter(SingleRowIdentificationParameters.NEUTRAL_MASS)
        .setIonMass(row.getAverageMZ());

    // Set charge.
    final int charge = row.getBestPeak().getCharge();
    if (charge > 0) {

      parameters.getParameter(
          SingleRowIdentificationParameters.NEUTRAL_MASS).setCharge(
          charge);
    }

    // Run task.
    if (parameters.showSetupDialog() == ExitCode.OK) {

      MZmineCore.getTaskController().addTask(
          new SingleRowIdentificationTask(
              parameters.cloneParameter(), row));
    }
  }
View Full Code Here

   *            the peak-list row.
   */
  public static void singleRowSearch(final PeakList peakList,
      final PeakListRow row) {

    final ParameterSet parameters = MZmineCore.getConfiguration()
        .getModuleParameters(NistMsSearchModule.class);
    if (parameters.showSetupDialog() == ExitCode.OK) {

      MZmineCore.getTaskController().addTask(
          new NistMsSearchTask(row, peakList, parameters));
    }
  }
View Full Code Here

  private static final String MODULE_NAME = "Formula prediction";

  public static void showSingleRowIdentificationDialog(PeakListRow row) {

    ParameterSet parameters = MZmineCore.getConfiguration()
        .getModuleParameters(FormulaPredictionModule.class);

    double mzValue = row.getAverageMZ();
    parameters.getParameter(FormulaPredictionParameters.neutralMass)
        .setIonMass(mzValue);

    int charge = row.getBestPeak().getCharge();
    if (charge > 0) {
      parameters.getParameter(FormulaPredictionParameters.neutralMass)
          .setCharge(charge);
    }

    ExitCode exitCode = parameters.showSetupDialog();
    if (exitCode != ExitCode.OK)
      return;

    SingleRowPredictionTask newTask = new SingleRowPredictionTask(
        parameters.cloneParameter(), row);

    // execute the sequence
    MZmineCore.getTaskController().addTask(newTask);

  }
View Full Code Here

    if (command.equals("SHOW_SPECTRUM")) {
      RawDataFile[] selectedFiles = tree
          .getSelectedObjects(RawDataFile.class);
      SpectraVisualizerModule module = MZmineCore
          .getModuleInstance(SpectraVisualizerModule.class);
      ParameterSet parameters = MZmineCore.getConfiguration()
          .getModuleParameters(SpectraVisualizerModule.class);
      parameters.getParameter(SpectraVisualizerParameters.dataFiles)
          .setValue(selectedFiles);
      ExitCode exitCode = parameters.showSetupDialog();
      if (exitCode == ExitCode.OK)
        module.runModule(parameters, new ArrayList<Task>());
    }

    if (command.equals("SHOW_2D")) {
View Full Code Here

        intensities[i] = dp != null ? dp.getIntensity() : 0.0;
      }

      // Resolve peaks.
      final PeakResolver resolverModule = resolver.getModule();
      final ParameterSet resolverParams = resolver.getParameterSet();
      final ChromatographicPeak[] peaks = resolverModule.resolvePeaks(
          chromatogram, scanNumbers, retentionTimes, intensities,
          resolverParams);

      // Add peaks to the new peak list.
View Full Code Here

    return ExitCode.OK;
  }

  public static void showIntensityPlot(PeakList peakList, PeakListRow rows[]) {

    ParameterSet parameters = MZmineCore.getConfiguration()
        .getModuleParameters(IntensityPlotModule.class);

    parameters.getParameter(IntensityPlotParameters.peakList).setValue(
        new PeakList[]{peakList});

    parameters.getParameter(IntensityPlotParameters.dataFiles).setChoices(
        peakList.getRawDataFiles());

    parameters.getParameter(IntensityPlotParameters.dataFiles).setValue(
        peakList.getRawDataFiles());

    parameters.getParameter(IntensityPlotParameters.selectedRows)
        .setChoices(rows);
    parameters.getParameter(IntensityPlotParameters.selectedRows).setValue(
        rows);

    UserParameter projectParams[] = MZmineCore.getCurrentProject()
        .getParameters();
    Object xAxisSources[] = new Object[projectParams.length + 1];
    xAxisSources[0] = IntensityPlotParameters.rawDataFilesOption;

    for (int i = 0; i < projectParams.length; i++) {
      xAxisSources[i + 1] = new ParameterWrapper(projectParams[i]);
    }

    parameters.getParameter(IntensityPlotParameters.xAxisValueSource)
        .setChoices(xAxisSources);

    ExitCode exitCode = parameters.showSetupDialog();

    if (exitCode == ExitCode.OK) {
      IntensityPlotFrame newFrame = new IntensityPlotFrame(
          parameters.cloneParameter());
      MZmineCore.getDesktop().addInternalFrame(newFrame);
    }

  }
View Full Code Here

TOP

Related Classes of net.sf.mzmine.parameters.ParameterSet

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.