Package net.sf.mzmine.data

Examples of net.sf.mzmine.data.DataPoint


          .parseInt(getTextOfElement());
    }

    if (qName.equals(RawDataElementName_2_3.MASS_LIST.getElementName())) {
      char encodedDataPoints[] = getTextOfElement().toCharArray();
      DataPoint dataPoints[] = ScanUtils
          .decodeDataPointsBase64(encodedDataPoints);
      SimpleMassList newML = currentMassLists
          .get(currentMassLists.size() - 1);
      newML.setDataPoints(dataPoints);
    }
View Full Code Here


    if (qName.equals(PeakListElementName_2_0.ISOTOPE.getElementName())) {
      String text = getTextOfElement();
      String items[] = text.split(":");
      double mz = Double.valueOf(items[0]);
      double intensity = Double.valueOf(items[1]);
      DataPoint isotope = new SimpleDataPoint(mz, intensity);
      currentIsotopes.add(isotope);
    }

    if (qName.equals(PeakListElementName_2_0.METHOD_NAME.getElementName())) {
      String appliedMethod = getTextOfElement();
View Full Code Here

          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

      // Convert the peak pattern to array
      ChromatographicPeak originalPeaks[] = bestFitPeaks
          .toArray(new ChromatographicPeak[0]);

      // Create a new SimpleIsotopePattern
      DataPoint isotopes[] = new DataPoint[bestFitPeaks.size()];
      for (int i = 0; i < isotopes.length; i++) {
        ChromatographicPeak p = originalPeaks[i];
        isotopes[i] = new SimpleDataPoint(p.getMZ(), p.getHeight());

      }
View Full Code Here

          + msmsScan.getScanNumber()
          + " does not have a mass list called '" + massListName
          + "'");
    }

    DataPoint msmsIons[] = massList.getDataPoints();

    if (msmsIons == null) {
      throw new IllegalArgumentException("Mass list " + massList
          + " does not contain data for scan #"
          + msmsScan.getScanNumber());
View Full Code Here

    float mass, height;
    for (int scan : scanNumbers) {
      dataScanStream.writeInt(scan);
      dataScanStream.flush();
      DataPoint mzPeak = peak.getDataPoint(scan);
      if (mzPeak != null) {
        mass = (float) mzPeak.getMZ();
        height = (float) mzPeak.getIntensity();
      } else {
        mass = 0f;
        height = 0f;
      }
      dataMassStream.writeFloat(mass);
View Full Code Here

  private void fillIsotopePatternElement(IsotopePattern isotopePattern,
      TransformerHandler hd) throws SAXException, IOException {

    AttributesImpl atts = new AttributesImpl();

    DataPoint isotopes[] = isotopePattern.getDataPoints();

    for (DataPoint isotope : isotopes) {
      hd.startElement("", "",
          PeakListElementName.ISOTOPE.getElementName(), atts);
      String isotopeString = isotope.getMZ() + ":"
View Full Code Here

    if (qName.equals(PeakListElementName_2_3.ISOTOPE.getElementName())) {
      String text = getTextOfElement();
      String items[] = text.split(":");
      double mz = Double.valueOf(items[0]);
      double intensity = Double.valueOf(items[1]);
      DataPoint isotope = new SimpleDataPoint(mz, intensity);
      currentIsotopes.add(isotope);
    }

    if (qName.equals(PeakListElementName_2_3.METHOD_NAME.getElementName())) {
      String appliedMethod = getTextOfElement();
View Full Code Here

        + currentScan.getScanNumber();

    String subTitle = "MS" + currentScan.getMSLevel() + ", RT "
        + rtFormat.format(currentScan.getRetentionTime());

    DataPoint basePeak = currentScan.getBasePeak();
    if (basePeak != null) {
      subTitle += ", base peak: " + mzFormat.format(basePeak.getMZ())
          + " m/z ("
          + intensityFormat.format(basePeak.getIntensity()) + ")";
    }
    spectrumPlot.setTitle(title, subTitle);

  }
View Full Code Here

      // Check whether the base peak or secondary base peak are valid
      // fragments
      List<Integer> fameBasePeaks = Ints.asList(FameData.FAME_BASE_PEAKS);

      if (s.getBasePeak() != null) {
        DataPoint secondaryBasePeak = s.getSecondaryBasePeak();

        if (fameBasePeaks.contains((int) s.getBasePeak().getMZ())
            || (secondaryBasePeak != null && (secondaryBasePeak
                .getMZ() == 74 || secondaryBasePeak.getMZ() == 87))) {
          allCandidates.add(new SimpleScan(s));
          totalScans += 2 * FameData.N_FAMES;
        }
      }

      processedScans++;
    }

    // Perform C13 Isotope filtering on candidates
    for (SimpleScan s : allCandidates)
      applyC13IsotopeFilter(s);

    // Find spectrum with the highest similarity to a library spectrum
    double maxSimilarity = 0;
    int libraryMatch = -1;
    SimpleScan highestMatch = null;

    for (SimpleScan s : allCandidates) {
      DataPoint basePeak = s.getBasePeak();

      double bestSimilarity = 0;
      int matchesCount = 0;

      for (int i = 0; i < FameData.N_FAMES; i++) {
View Full Code Here

TOP

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

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.