Package net.sf.mzmine.data

Examples of net.sf.mzmine.data.Scan


    int[] fragmentScanNumbers = dataFile.getScanNumbers(2, rtRange);

    for (int number : fragmentScanNumbers) {

      Scan scan = dataFile.getScan(number);

      if (mzRange.contains(scan.getPrecursorMZ())) {

        DataPoint basePeak = scan.getBasePeak();

        // If there is no peak in the scan, basePeak can be null
        if (basePeak == null)
          continue;

        if (basePeak.getIntensity() > topBasePeak) {
          bestFragmentScan = scan.getScanNumber();
          topBasePeak = basePeak.getIntensity();
        }
      }

    }
View Full Code Here


    // Update fragment scan
    fragmentScan = ScanUtils.findBestFragmentScan(dataFile,
        rawDataPointsRTRange, rawDataPointsMZRange);

    if (fragmentScan > 0) {
      Scan fragmentScanObject = dataFile.getScan(fragmentScan);
      int precursorCharge = fragmentScanObject.getPrecursorCharge();
      if (precursorCharge > 0)
        this.charge = precursorCharge;
    }

  }
View Full Code Here

        throw new SAXException("Error in project: data file "
            + peakColumnID + " not found");

      for (int i = 0; i < numOfMZpeaks; i++) {

        Scan sc = dataFile.getScan(scanNumbers[i]);
        double retentionTime = sc.getRetentionTime();

        double mz = masses[i];
        double intensity = intensities[i];

        if ((peakRTRange == null) || (peakIntensityRange == null)) {
View Full Code Here

    // Add all the mass lists after we opened the data points file, because
    // that is where the mass list data will be stored. This is a hack
    // because in MZmine 2.3 and 2.4 the mass lists were saved as XML
    // instead of being part of the data points file.
    for (SimpleMassList ml : allMassLists) {
      Scan s = ml.getScan();
      s.addMassList(ml);
    }

    RawDataFile rawDataFile = newRawDataFile.finishWriting();
    return rawDataFile;
View Full Code Here

        throw new SAXException("Error in project: data file "
            + peakColumnID + " not found");

      for (int i = 0; i < numOfMZpeaks; i++) {

        Scan sc = dataFile.getScan(scanNumbers[i]);
        double retentionTime = sc.getRetentionTime();

        double mz = masses[i];
        double intensity = intensities[i];

        if ((peakRTRange == null) || (peakIntensityRange == null)) {
View Full Code Here

          if (msmsScanNum <= 0) {
            statement.setNull(i + 1, Types.BLOB);
            break;
          }
          RawDataFile dataFile = row.getBestPeak().getDataFile();
          Scan msmsScan = dataFile.getScan(msmsScanNum);
          MassList msmsMassList = msmsScan.getMassList(dataValue);
          // Check if there is a masslist for the scan
          if (msmsMassList == null) {
            statement.setNull(i + 1, Types.BLOB);
            break;
          }
View Full Code Here

      for (int scanNumber : dataFile.getScanNumbers(1)) {
        // Canceled?
        if (isCanceled())
          return;

        Scan spectrum = dataFile.getScan(scanNumber);

        // Add scan to new data file
        int storageID = rawDataFileWriter.storeDataPoints(spectrum
            .getDataPoints());
        CorrectedSpectrum newSpectrum = new CorrectedSpectrum(spectrum,
            rawDataFileWriter, spectrum.getNumberOfDataPoints(),
            storageID);

        rawDataFileWriter.addScan(newSpectrum);

        // Store spectrum locally for processing and analysis
View Full Code Here

      // Canceled?
      if (isCanceled())
        return;

      // Get the current spectrum
      Scan spectrum = dataFile.getScan(scanNumber);

      // Produce List of ion masses in the current spectrum
      // IMPORTANT: We assume the truncating the double-valued ion masses
      // will
      // since the deconvoluted data only gives integral values
      List<Integer> spectraMasses = new ArrayList<Integer>();

      for (DataPoint p : spectrum.getDataPoints())
        spectraMasses.add((int) p.getMZ());

      // Find candidate masses by iterating over all possible mass values
      // up to m/z = 1000
      for (int i = 1; i <= 1000; i++) {
View Full Code Here

    // Check that each spectrum is a processed CorrectedSpectrum
    if (count == 0) {
      for (SpectrumType type : SPECTRA_DATA.keySet()) {
        for (RawDataFile f : getParameter(SPECTRA_DATA.get(type))
            .getValue()) {
          Scan s = f.getScan(f.getScanNumbers()[0]);

          if (!(s instanceof CorrectedSpectrum)
              || !((CorrectedSpectrum) s).isRetentionCorrected()) {
            errorMessages.add("''" + f.getName()
                + "' is not a RI corrected file.");
View Full Code Here

        throw new SAXException("Error in project: data file "
            + peakColumnID + " not found");

      for (int i = 0; i < numOfMZpeaks; i++) {

        Scan sc = dataFile.getScan(scanNumbers[i]);
        double retentionTime = sc.getRetentionTime();

        double mz = masses[i];
        double intensity = intensities[i];

        if ((peakRTRange == null) || (peakIntensityRange == null)) {
View Full Code Here

TOP

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

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.