Package net.sf.mzmine.data

Examples of net.sf.mzmine.data.IsotopePattern


        return;
      }

      index = IDList.convertRowIndexToModel(index);

      final IsotopePattern predictedPattern = listElementModel
          .getCompoundAt(index).getIsotopePattern();

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


          } else {
            statement.setNull(i + 1, Types.VARCHAR);
          }
          break;
        case ISOTOPEPATTERN :
          IsotopePattern isotopes = row.getBestIsotopePattern();
          if (isotopes == null) {
            statement.setNull(i + 1, Types.BLOB);
            break;
          }
          DataPoint dataPoints[] = isotopes.getDataPoints();
          byte bytes[] = ScanUtils
              .encodeDataPointsToBytes(dataPoints);
          ByteArrayInputStream is = new ByteArrayInputStream(bytes);
          statement.setBlob(i + 1, is);
          break;
View Full Code Here

        PeakListElementName.FRAGMENT_SCAN.getElementName());

    int scanNumbers[] = peak.getScanNumbers();

    // <ISOTOPE_PATTERN>
    IsotopePattern isotopePattern = peak.getIsotopePattern();
    if (isotopePattern != null) {
      atts.addAttribute("", "",
          PeakListElementName.STATUS.getElementName(), "CDATA",
          String.valueOf(isotopePattern.getStatus()));
      atts.addAttribute("", "",
          PeakListElementName.DESCRIPTION.getElementName(), "CDATA",
          isotopePattern.getDescription());
      hd.startElement("", "",
          PeakListElementName.ISOTOPE_PATTERN.getElementName(), atts);
      atts.clear();

      fillIsotopePatternElement(isotopePattern, hd);
View Full Code Here

        }
      }

      if (parameters.getParameter(
          PathAlignerParameters.compareIsotopePattern).getValue()) {
        IsotopePattern ip1 = path.convertToAlignmentRow(0)
            .getBestIsotopePattern();
        IsotopePattern ip2 = peak.getBestIsotopePattern();

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

        .getIntensity(), ip2.getHighestIsotope().getIntensity());
    final double noiseIntensity = parameters.getParameter(
        IsotopePatternScoreParameters.isotopeNoiseLevel).getValue();

    // Normalize the isotopes to intensity 0..1
    IsotopePattern nip1 = IsotopePatternCalculator
        .normalizeIsotopePattern(ip1);
    IsotopePattern nip2 = IsotopePatternCalculator
        .normalizeIsotopePattern(ip2);

    // Merge the data points from both isotope patterns into a single array.
    // Data points from first pattern will have positive intensities, data
    // points from second pattern will have negative intensities.
    ArrayList<DataPoint> mergedDataPoints = new ArrayList<DataPoint>();
    for (DataPoint dp : nip1.getDataPoints()) {
      if (dp.getIntensity() * patternIntensity < noiseIntensity)
        continue;
      mergedDataPoints.add(dp);
    }
    for (DataPoint dp : nip2.getDataPoints()) {
      if (dp.getIntensity() * patternIntensity < noiseIntensity)
        continue;
      DataPoint negativeDP = new SimpleDataPoint(dp.getMZ(),
          dp.getIntensity() * -1);
      mergedDataPoints.add(negativeDP);
 
View Full Code Here

        IsotopePatternCalculatorParameters.polarity).getValue();
    double minAbundance = parameters.getParameter(
        IsotopePatternCalculatorParameters.minAbundance).getValue();

    try {
      IsotopePattern predictedPattern = calculateIsotopePattern(formula,
          minAbundance, charge, polarity);
      return predictedPattern;
    } catch (Exception e) {
      MZmineCore.getDesktop().displayException(e);
    }
View Full Code Here

            if (!PeakUtils.compareIdentities(row, candidate))
              continue;
          }

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

            if ((ip1 != null) && (ip2 != null)) {
              ParameterSet isotopeParams = parameters
                  .getParameter(
                      JoinAlignerParameters.compareIsotopePattern)
View Full Code Here

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

    IsotopePattern pattern = row.getBestIsotopePattern();

    DataPoint isotopes[];

    if (pattern != null) {
      isotopes = pattern.getDataPoints();
    } else {
      isotopes = new DataPoint[1];
      ChromatographicPeak bestPeak = row.getBestPeak();
      isotopes[0] = new SimpleDataPoint(bestPeak.getMZ(),
          bestPeak.getHeight());
View Full Code Here

TOP

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

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.