Examples of IsotopePattern


Examples of net.sf.mzmine.data.IsotopePattern

      searchMZRange = new Range(0, Double.MAX_VALUE);
      normalizationFactor = scanDataSet
          .getHighestIntensity(searchMZRange);
    }

    IsotopePattern normalizedPattern = IsotopePatternCalculator
        .normalizeIsotopePattern(newPattern, normalizationFactor);
    Color newColor;
    if (newPattern.getStatus() == IsotopePatternStatus.DETECTED)
      newColor = detectedIsotopesColor;
    else
View Full Code Here

Examples of net.sf.mzmine.data.IsotopePattern

      dialog.setVisible(true);
    }

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

      IsotopePattern newPattern = IsotopePatternCalculator
          .showIsotopePredictionDialog();

      if (newPattern == null)
        return;
View Full Code Here

Examples of net.sf.mzmine.data.IsotopePattern

    if (dataset instanceof IsotopesDataSet) {

      IsotopesDataSet isotopeDataSet = (IsotopesDataSet) dataset;

      IsotopePattern pattern = isotopeDataSet.getIsotopePattern();
      double relativeIntensity = intValue
          / pattern.getHighestIsotope().getIntensity() * 100;

      String tooltip = "Isotope pattern: " + pattern.getDescription()
          + "\nStatus: " + pattern.getStatus() + "\nData point m/z: "
          + mzFormat.format(mzValue) + "\nData point intensity: "
          + intensityFormat.format(intValue)
          + "\nRelative intensity: "
          + percentFormat.format(relativeIntensity) + "%";

View Full Code Here

Examples of net.sf.mzmine.data.IsotopePattern

    // 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++) {

      final DBCompound compound = gateway.getCompound(findCompounds[i],
          db.getParameterSet());
      final String formula = compound
          .getPropertyValue(PeakIdentity.PROPERTY_FORMULA);

      // If required, check isotope score.
      if (isotopeFilter && rowIsotopePattern != null && formula != null) {

        // First modify the formula according to ionization.
        final String adjustedFormula = FormulaUtils.ionizeFormula(
            formula, ionType, charge);

        LOG.finest("Calculating isotope pattern for compound formula "
            + formula + " adjusted to " + adjustedFormula);

        // Generate IsotopePattern for this compound
        final IsotopePattern compoundIsotopePattern = IsotopePatternCalculator
            .calculateIsotopePattern(adjustedFormula,
                MIN_ABUNDANCE, charge, ionType.getPolarity());

        // Check isotope pattern match
        boolean check = IsotopePatternScoreCalculator.checkMatch(
View Full Code Here

Examples of net.sf.mzmine.data.IsotopePattern

    ResultWindow window = new ResultWindow(peakListRow, searchedMass, this);
    window.setTitle("Searching for " + massFormater.format(searchedMass)
        + " amu");
    desktop.addInternalFrame(window);

    IsotopePattern detectedPattern = peakListRow.getBestIsotopePattern();
    if ((isotopeFilter) && (detectedPattern == null)) {
      final String msg = "Cannot calculate isotope pattern scores, because selected"
          + " peak does not have any isotopes. Have you run the isotope peak grouper?";
      MZmineCore.getDesktop().displayMessage(msg);
    }

    try {
      String compoundIDs[] = gateway.findCompounds(searchedMass,
          mzTolerance, numOfResults, db.getParameterSet());

      // Get the number of results
      numItems = compoundIDs.length;

      if (numItems == 0) {
        window.setTitle("Searching for "
            + massFormater.format(searchedMass)
            + " amu: no results found");
      }

      // Process each one of the result ID's.
      for (int i = 0; i < numItems; i++) {

        if (getStatus() != TaskStatus.PROCESSING) {
          return;
        }

        DBCompound compound = gateway.getCompound(compoundIDs[i],
            db.getParameterSet());
        String formula = compound
            .getPropertyValue(PeakIdentity.PROPERTY_FORMULA);

        if (formula != null) {

          // First modify the formula according to the ionization
          String adjustedFormula = FormulaUtils.ionizeFormula(
              formula, ionType, charge);

          logger.finest("Calculating isotope pattern for compound formula "
              + formula + " adjusted to " + adjustedFormula);

          // Generate IsotopePattern for this compound
          IsotopePattern compoundIsotopePattern = IsotopePatternCalculator
              .calculateIsotopePattern(adjustedFormula, 0.001,
                  charge, ionType.getPolarity());

          compound.setIsotopePattern(compoundIsotopePattern);

          IsotopePattern rawDataIsotopePattern = peakListRow
              .getBestIsotopePattern();

          // If required, check isotope score
          if (isotopeFilter && (rawDataIsotopePattern != null)
              && (compoundIsotopePattern != null)) {
View Full Code Here

Examples of net.sf.mzmine.data.IsotopePattern

    MZmineCore.getDesktop().addInternalFrame(resultWindow);

    logger.finest("Starting search for formulas for " + massRange
        + " Da, elements " + Arrays.toString(elementRules));

    IsotopePattern detectedPattern = peakListRow.getBestIsotopePattern();
    if ((checkIsotopes) && (detectedPattern == null)) {
      final String msg = "Cannot calculate isotope pattern scores, because selected"
          + " peak does not have any isotopes. Have you run the isotope peak grouper?";
      MZmineCore.getDesktop().displayMessage(msg);
    }
View Full Code Here

Examples of net.sf.mzmine.data.IsotopePattern

      if (!check)
        return;
    }

    // Calculate isotope similarity score
    IsotopePattern detectedPattern = peakListRow.getBestIsotopePattern();
    IsotopePattern predictedIsotopePattern = null;
    Double isotopeScore = null;
    if ((checkIsotopes) && (detectedPattern != null)) {

      String stringFormula = MolecularFormulaManipulator
          .getString(cdkFormula);
View Full Code Here

Examples of net.sf.mzmine.data.IsotopePattern

    }

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

      IsotopePattern predictedPattern = formula.getPredictedIsotopes();

      if (predictedPattern == null)
        return;

      ChromatographicPeak peak = peakListRow.getBestPeak();
View Full Code Here

Examples of net.sf.mzmine.data.IsotopePattern

   */
  public static void copyPeakProperties(ChromatographicPeak source,
      ChromatographicPeak target) {

    // Copy isotope pattern
    IsotopePattern originalPattern = source.getIsotopePattern();
    if (originalPattern != null)
      target.setIsotopePattern(originalPattern);

    // Copy charge
    int charge = source.getCharge();
View Full Code Here

Examples of net.sf.mzmine.data.IsotopePattern

    ChromatographicPeak peaks[] = getPeaks();
    Arrays.sort(peaks, new PeakSorter(SortingProperty.Height,
        SortingDirection.Descending));

    for (ChromatographicPeak peak : peaks) {
      IsotopePattern ip = peak.getIsotopePattern();
      if (ip != null)
        return ip;
    }

    return null;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.