Package net.sf.mzmine.parameters

Examples of net.sf.mzmine.parameters.ParameterSet


            (Component) e.getSource());

    if (parent != null) {

      // Show dialog.
      final ParameterSet parameters = new AddAdductParameters();
      if (parameters.showSetupDialog() == ExitCode.OK) {

        // Create new adduct.
        final AdductType adduct = new AdductType(parameters
            .getParameter(AddAdductParameters.NAME).getValue(),
            parameters.getParameter(
                AddAdductParameters.MASS_DIFFERENCE).getValue());

        // Add to list of choices (if not already present).
        final Collection<AdductType> choices = new ArrayList<AdductType>(
            Arrays.asList((AdductType[]) parent.getChoices()));
View Full Code Here


    this.value = value;
  }

  @Override
  public OptionalModuleParameter cloneParameter() {
    final ParameterSet embeddedParametersClone = embeddedParameters
        .cloneParameter();
    final OptionalModuleParameter copy = new OptionalModuleParameter(name,
        description, embeddedParametersClone);
    copy.setValue(this.getValue());
    return copy;
View Full Code Here

        IsotopePattern ip1 = path.convertToAlignmentRow(0)
            .getBestIsotopePattern();
        IsotopePattern ip2 = peak.getBestIsotopePattern();

        if ((ip1 != null) && (ip2 != null)) {
          ParameterSet isotopeParams = parameters.getParameter(
              PathAlignerParameters.compareIsotopePattern)
              .getEmbeddedParameters();

          if (!IsotopePatternScoreCalculator.checkMatch(ip1, ip2,
              isotopeParams)) {
View Full Code Here

   * return null in case user clicked Cancel.
   */
  @Nullable
  public static Range showRangeCalculationDialog() {

    ParameterSet myParameters = MZmineCore.getConfiguration()
        .getModuleParameters(MzRangeCalculatorModule.class);

    if (myParameters == null)
      return null;

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

    String formula = myParameters.getParameter(
        MzRangeCalculatorParameters.formula).getValue();
    IonizationType ionType = myParameters.getParameter(
        MzRangeCalculatorParameters.ionType).getValue();
    MZTolerance mzTolerance = myParameters.getParameter(
        MzRangeCalculatorParameters.mzTolerance).getValue();
    Integer charge = myParameters.getParameter(
        MzRangeCalculatorParameters.charge).getValue();

    if ((formula == null) || (ionType == null) || (mzTolerance == null)
        || (charge == null))
      return null;
View Full Code Here

      dataset = createSampleWekaDataset(rawData);
    }

    // Run the clustering algorithm
    ClusteringAlgorithm clusteringAlgorithm = clusteringStep.getModule();
    ParameterSet clusteringParameters = clusteringStep.getParameterSet();
    ClusteringResult result = clusteringAlgorithm.performClustering(
        dataset, clusteringParameters);

    String cluster = "";
    if (clusteringAlgorithm.getName().toString()
View Full Code Here

  }

  public static IsotopePattern showIsotopePredictionDialog() {

    ParameterSet parameters = MZmineCore.getConfiguration()
        .getModuleParameters(IsotopePatternCalculator.class);
    ExitCode exitCode = parameters.showSetupDialog();
    if (exitCode != ExitCode.OK)
      return null;

    String formula = parameters.getParameter(
        IsotopePatternCalculatorParameters.formula).getValue();
    int charge = parameters.getParameter(
        IsotopePatternCalculatorParameters.charge).getValue();
    Polarity polarity = parameters.getParameter(
        IsotopePatternCalculatorParameters.polarity).getValue();
    double minAbundance = parameters.getParameter(
        IsotopePatternCalculatorParameters.minAbundance).getValue();

    try {
      IsotopePattern predictedPattern = calculateIsotopePattern(formula,
          minAbundance, charge, polarity);
View Full Code Here

          if (compareIsotopePattern) {
            IsotopePattern ip1 = row.getBestIsotopePattern();
            IsotopePattern ip2 = candidate.getBestIsotopePattern();

            if ((ip1 != null) && (ip2 != null)) {
              ParameterSet isotopeParams = parameters
                  .getParameter(
                      JoinAlignerParameters.compareIsotopePattern)
                  .getEmbeddedParameters();

              if (!IsotopePatternScoreCalculator.checkMatch(ip1,
View Full Code Here

  String getName() {
    return MODULE_NAME;
  }

  public static void showNewPeakListVisualizerWindow(PeakList peakList) {
    ParameterSet parameters = MZmineCore.getConfiguration()
        .getModuleParameters(PeakListTableModule.class);

    // If our peak list is a list of mass candidates from the
    // deconvolutedanalysis.massdetection module, use our custom table
    // window.
View Full Code Here

    return MODULE_NAME;
  }

  public static void exportIsotopePattern(PeakListRow row) {

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

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

    File outputFile = parameters.getParameter(
        IsotopePatternExportParameters.outputFile).getValue();
    if (outputFile == null)
      return;

    IsotopePattern pattern = row.getBestIsotopePattern();
View Full Code Here

    return MODULE_NAME;
  }

  public static void exportMSMS(PeakListRow row) {

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

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

    File outputFile = parameters.getParameter(
        MSMSExportParameters.outputFile).getValue();
    String massListName = parameters.getParameter(
        MSMSExportParameters.massList).getValue();

    if ((outputFile == null) || (massListName == null))
      return;
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.