Package net.sf.mzmine.data.impl

Examples of net.sf.mzmine.data.impl.SimplePeakIdentity


        lineMZ = Double.parseDouble(values[i]);
      if (fieldOrder[i] == FieldItem.FIELD_RT)
        lineRT = Double.parseDouble(values[i]);
    }

    SimplePeakIdentity newIdentity = new SimplePeakIdentity(lineName,
        lineFormula, dataBaseFile.getName(), lineID, null);

    for (PeakListRow peakRow : peakList.getRows()) {

      Range mzRange = mzTolerance.getToleranceRange(peakRow
View Full Code Here


      Range mzRange = mzTolerance.getToleranceRange(peaks.get(row)
          .getMZ());
      Range rtRange = rtTolerance.getToleranceRange(peaks.get(row)
          .getRT());
      newRow.addPeakIdentity(new SimplePeakIdentity(peaks.get(row)
          .getName()), true);

      Gap newGap = new Gap(newRow, dataFile, mzRange, rtRange,
          intTolerance);
View Full Code Here

            // Add (copy of) identities to peak row.
            int maxMatchFactor = -1;
            for (final PeakIdentity identity : identities) {

              // Copy the identity.
              final PeakIdentity id = new SimplePeakIdentity(
                  (Hashtable<String, String>) identity
                      .getAllProperties());

              // Best match factor?
              final boolean isPreferred;
              final int matchFactor = Integer.parseInt(id
                  .getPropertyValue(MATCH_FACTOR_PROPERTY));
              if (matchFactor > maxMatchFactor) {

                maxMatchFactor = matchFactor;
                isPreferred = true;
View Full Code Here

            final String reverseMatchFactor = hitMatcher.group(4);
            if (Integer.parseInt(matchFactor) >= minMatchFactor
                && Integer.parseInt(reverseMatchFactor) >= minReverseMatchFactor) {

              // Extract identity from hit information.
              final SimplePeakIdentity id = new SimplePeakIdentity(
                  hitMatcher.group(1), hitMatcher.group(2),
                  SEARCH_METHOD, hitMatcher.group(7), null);
              id.setPropertyValue(MATCH_FACTOR_PROPERTY,
                  matchFactor);
              id.setPropertyValue(REVERSE_MATCH_FACTOR_PROPERTY,
                  reverseMatchFactor);
              id.setPropertyValue(CAS_PROPERTY,
                  hitMatcher.group(5));
              id.setPropertyValue(MOLECULAR_WEIGHT_PROPERTY,
                  hitMatcher.group(6));
              hitList.add(id);
            }
          } else {
View Full Code Here

    index = resultsTable.convertRowIndexToModel(index);
    ResultFormula formula = resultsTableModel.getFormula(index);

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

      SimplePeakIdentity newIdentity = new SimplePeakIdentity(
          formula.getFormulaAsString());
      peakListRow.addPeakIdentity(newIdentity, false);

      // Notify the GUI about the change in the project
      MZmineCore.getCurrentProject().notifyObjectChanged(peakListRow,
View Full Code Here

      if (isCanceled()) {
        break;
      }

      for (ResultFormula f : this.ResultingFormulas) {
        SimplePeakIdentity newIdentity = new SimplePeakIdentity(
            f.getFormulaAsString());
        row.addPeakIdentity(newIdentity, false);
      }
      done++;
      progress = (float) (done / total);
View Full Code Here

    // Add identities for each peak.
    int peakIndex = 0;
    for (final ChromatographicPeak peak : peaks) {

      // Create pseudo-spectrum identity
      final SimplePeakIdentity identity = new SimplePeakIdentity(
          "Pseudo-spectrum #"
              + String.format("%03d", spectra[peakIndex]));
      identity.setPropertyValue(PeakIdentity.PROPERTY_METHOD,
          "Bioconductor CAMERA");

      // Add isotope info, if any.
      if (isotopes != null) {

        final String isotope = isotopes[peakIndex].trim();
        if (isotope.length() > 0) {

          // Parse the isotope pattern.
          final Matcher matcher = ISOTOPE_PATTERN.matcher(isotope);
          if (matcher.matches()) {

            identity.setPropertyValue("Isotope", matcher.group(1));

          } else {

            LOG.warning("Irregular isotope value: " + isotope);
          }
View Full Code Here

    }

    // <PEAK_IDENTITY>
    if (qName
        .equals(PeakListElementName_2_5.PEAK_IDENTITY.getElementName())) {
      SimplePeakIdentity identity = new SimplePeakIdentity(
          identityProperties);
      buildingRow.addPeakIdentity(identity, preferred);
    }

    // <ROW>
View Full Code Here

    if (qName
        .equals(PeakListElementName_2_0.PEAK_IDENTITY.getElementName())) {
      String content = getTextOfElement();
      if (identityProperties.get(PeakIdentity.PROPERTY_NAME) == null)
        identityProperties.put(PeakIdentity.PROPERTY_NAME, content);
      SimplePeakIdentity identity = new SimplePeakIdentity(
          identityProperties);
      buildingRow.addPeakIdentity(identity, preferred);
    }

    // <ROW>
View Full Code Here

    }

    // <PEAK_IDENTITY>
    if (qName
        .equals(PeakListElementName_2_3.PEAK_IDENTITY.getElementName())) {
      SimplePeakIdentity identity = new SimplePeakIdentity(
          identityProperties);
      buildingRow.addPeakIdentity(identity, preferred);
    }

    // <ROW>
View Full Code Here

TOP

Related Classes of net.sf.mzmine.data.impl.SimplePeakIdentity

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.