Package net.sf.mzmine.data

Examples of net.sf.mzmine.data.Scan


  public static SpectraVisualizerWindow showNewSpectrumWindow(
      RawDataFile dataFile, int scanNumber, ChromatographicPeak peak,
      IsotopePattern detectedPattern, IsotopePattern predictedPattern) {

    Scan scan = dataFile.getScan(scanNumber);

    if (scan == null) {
      MZmineCore.getDesktop().displayErrorMessage(
          "Raw data file " + dataFile + " does not contain scan #"
              + scanNumber);
View Full Code Here


          / (double) intensityWindow.size());

    }

    // Create filtered scan
    Scan newScan = new SimpleScan(sc.getDataFile(), sc.getScanNumber(),
        sc.getMSLevel(), sc.getRetentionTime(),
        sc.getParentScanNumber(), sc.getPrecursorMZ(),
        sc.getPrecursorCharge(), sc.getFragmentScanNumbers(),
        newDataPoints, true);
View Full Code Here

      if (isCanceled()) {
        return;
      }

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

      // Feed this scan to all gaps
      for (Gap gap : gaps) {
        gap.offerNextScan(scan);
      }
View Full Code Here

    // Create copy of scans.
    for (int scanIndex = 0; !isCanceled() && scanIndex < numScans; scanIndex++) {

      // Get original scan.
      final Scan origScan = origDataFile.getScan(scanNumbers[scanIndex]);

      // Get data points (m/z and intensity pairs) of the original scan
      final DataPoint[] origDataPoints = origScan.getDataPoints();
      final DataPoint[] newDataPoints = new DataPoint[origDataPoints.length];

      // Copy original data points.
      int i = 0;
      for (final DataPoint dp : origDataPoints) {
View Full Code Here

    // Subtract baselines.
    LOG.finest("Subtracting baselines.");
    for (int scanIndex = 0; !isCanceled() && scanIndex < numScans; scanIndex++) {

      // Get original scan.
      final Scan origScan = origDataFile.getScan(scanNumbers[scanIndex]);

      // Get data points (m/z and intensity pairs) of the original scan
      final DataPoint[] origDataPoints = origScan.getDataPoints();

      // Create and write new corrected scan.
      final SimpleScan newScan = new SimpleScan(origScan);
      newScan.setDataPoints(subtractBasePeakBaselines(origDataPoints,
          baseChrom, numBins, scanIndex));
View Full Code Here

    // Subtract baselines.
    LOG.finest("Subtracting baselines.");
    for (int scanIndex = 0; !isCanceled() && scanIndex < numScans; scanIndex++) {

      // Get original scan.
      final Scan origScan = origDataFile.getScan(scanNumbers[scanIndex]);

      // Get data points (m/z and intensity pairs) of the original scan
      final DataPoint[] origDataPoints = origScan.getDataPoints();

      // Create and write new corrected scan.
      final SimpleScan newScan = new SimpleScan(origScan);
      newScan.setDataPoints(subtractTICBaselines(origDataPoints,
          baseChrom, numBins, scanIndex));
View Full Code Here

    final double[][] chromatograms = new double[numBins][numScans];

    for (int scanIndex = 0; !isCanceled() && scanIndex < numScans; scanIndex++) {

      // Get original scan.
      final Scan scan = origDataFile.getScan(scanNumbers[scanIndex]);

      // Process data points.
      for (final DataPoint dataPoint : scan.getDataPoints()) {

        final int bin = mzRange.binNumber(numBins, dataPoint.getMZ());
        final double value = chromatograms[bin][scanIndex];
        chromatograms[bin][scanIndex] = Math.max(value,
            dataPoint.getIntensity());
View Full Code Here

    final double[][] chromatograms = new double[numBins][numScans];

    for (int scanIndex = 0; !isCanceled() && scanIndex < numScans; scanIndex++) {

      // Get original scan.
      final Scan scan = origDataFile.getScan(scanNumbers[scanIndex]);

      // Process data points.
      for (final DataPoint dataPoint : scan.getDataPoints()) {

        chromatograms[mzRange.binNumber(numBins, dataPoint.getMZ())][scanIndex] += dataPoint
            .getIntensity();
      }
      progress++;
View Full Code Here

    }

    // Actions for scans

    if (command.equals("SHOW_SCAN")) {
      Scan selectedScans[] = tree.getSelectedObjects(Scan.class);
      for (Scan scan : selectedScans) {
        SpectraVisualizerModule.showNewSpectrumWindow(
            scan.getDataFile(), scan.getScanNumber());
      }
    }

    if (command.equals("SHOW_MASSLIST")) {
      MassList selectedMassLists[] = tree
          .getSelectedObjects(MassList.class);
      for (MassList massList : selectedMassLists) {
        Scan scan = massList.getScan();
        SpectraVisualizerWindow window = SpectraVisualizerModule
            .showNewSpectrumWindow(scan.getDataFile(),
                scan.getScanNumber());
        MassListDataSet dataset = new MassListDataSet(massList);
        window.addDataSet(dataset, Color.green);
      }
    }

    if (command.equals("REMOVE_MASSLIST")) {
      MassList selectedMassLists[] = tree
          .getSelectedObjects(MassList.class);
      for (MassList massList : selectedMassLists) {
        Scan scan = massList.getScan();
        scan.removeMassList(massList);
      }
    }

    if (command.equals("REMOVE_ALL_MASSLISTS")) {
      MassList selectedMassLists[] = tree
          .getSelectedObjects(MassList.class);
      for (MassList massList : selectedMassLists) {
        String massListName = massList.getName();
        RawDataFile dataFiles[] = MZmineCore.getCurrentProject()
            .getDataFiles();
        for (RawDataFile dataFile : dataFiles) {
          int scanNumbers[] = dataFile.getScanNumbers();
          for (int scanNum : scanNumbers) {
            Scan scan = dataFile.getScan(scanNum);
            MassList ml = scan.getMassList(massListName);
            if (ml != null)
              scan.removeMassList(ml);
          }
        }
      }
    }
View Full Code Here

      PeakListTableModule
          .showNewPeakListVisualizerWindow(clickedPeakList);
    }

    if (clickedObject instanceof Scan) {
      Scan clickedScan = (Scan) clickedObject;
      SpectraVisualizerModule.showNewSpectrumWindow(
          clickedScan.getDataFile(), clickedScan.getScanNumber());
    }

    if (clickedObject instanceof MassList) {
      MassList clickedMassList = (MassList) clickedObject;
      Scan clickedScan = clickedMassList.getScan();
      SpectraVisualizerWindow window = SpectraVisualizerModule
          .showNewSpectrumWindow(clickedScan.getDataFile(),
              clickedScan.getScanNumber());
      MassListDataSet dataset = new MassListDataSet(clickedMassList);
      window.addDataSet(dataset, Color.green);
    }

    if (clickedObject instanceof PeakListRow) {
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.