Package net.sf.mzmine.data

Examples of net.sf.mzmine.data.RawDataFile


    super(MZmineCore.getConfiguration().getMZFormat());

    setAutoButton = new JButton("Auto range");
    setAutoButton.addActionListener(this);
    RawDataFile currentFiles[] = MZmineCore.getCurrentProject()
        .getDataFiles();
    setAutoButton.setEnabled(currentFiles.length > 0);
    add(setAutoButton, 3, 0, 1, 1, 1, 0, GridBagConstraints.NONE);

    fromFormulaButton = new JButton("From formula");
View Full Code Here


    Object src = event.getSource();

    if (src == setAutoButton) {
      Range mzRange = null;
      RawDataFile currentFiles[] = MZmineCore.getCurrentProject()
          .getDataFiles();
      for (RawDataFile file : currentFiles) {
        Range fileRange = file.getDataMZRange(1);
        if (fileRange == null)
          continue;
View Full Code Here

              // Smooth peak.
              final double[] smoothed = convolve(intensities,
                  filterWeights);

              // Measure peak (max, ranges, area etc.)
              final RawDataFile dataFile = peak.getDataFile();
              final DataPoint[] newDataPoints = new DataPoint[numScans];
              double maxIntensity = 0.0;
              int maxScanNumber = -1;
              DataPoint maxDataPoint = null;
              Range intensityRange = null;
              double area = 0.0;
              for (int i = 0; i < numScans; i++) {

                final int scanNumber = scanNumbers[i];
                final DataPoint dataPoint = peak
                    .getDataPoint(scanNumber);
                final double intensity = smoothed[i];
                if (dataPoint != null && intensity > 0.0) {

                  // Create a new data point.
                  final double mz = dataPoint.getMZ();
                  final double rt = dataFile.getScan(
                      scanNumber).getRetentionTime();
                  final DataPoint newDataPoint = new SimpleDataPoint(
                      mz, intensity);
                  newDataPoints[i] = newDataPoint;

                  // Track maximum intensity data point.
                  if (intensity > maxIntensity) {

                    maxIntensity = intensity;
                    maxScanNumber = scanNumber;
                    maxDataPoint = newDataPoint;
                  }

                  // Update ranges.
                  if (intensityRange == null) {
                    intensityRange = new Range(intensity);
                  } else {
                    intensityRange.extendRange(intensity);
                  }

                  // Accumulate peak area.
                  if (i != 0) {

                    final DataPoint lastDP = newDataPoints[i - 1];
                    final double lastIntensity = lastDP == null
                        ? 0.0
                        : lastDP.getIntensity();
                    final double lastRT = dataFile.getScan(
                        scanNumbers[i - 1])
                        .getRetentionTime();
                    area += (rt - lastRT)
                        * (intensity + lastIntensity)
                        / 2.0;
View Full Code Here

    }

    // MS/MS evaluation is slowest, so let's do it last
    Double msmsScore = null;
    ChromatographicPeak bestPeak = peakListRow.getBestPeak();
    RawDataFile dataFile = bestPeak.getDataFile();
    Map<DataPoint, String> msmsAnnotations = null;
    int msmsScanNumber = bestPeak.getMostIntenseFragmentScanNumber();

    if ((checkMSMS) && (msmsScanNumber > 0)) {
      Scan msmsScan = dataFile.getScan(msmsScanNumber);
      String massListName = msmsParameters.getParameter(
          MSMSScoreParameters.massList).getValue();
      MassList ms2MassList = msmsScan.getMassList(massListName);
      if (ms2MassList == null) {
        setStatus(TaskStatus.ERROR);
        this.errorMessage = "The MS/MS scan #" + msmsScanNumber
            + " in file " + dataFile.getName()
            + " does not have a mass list called '" + massListName
            + "'";
        return;
      }
View Full Code Here

    double[][] rawData = new double[selectedRawDataFiles.length][selectedRows.length];
    for (int rowIndex = 0; rowIndex < selectedRows.length; rowIndex++) {
      PeakListRow peakListRow = selectedRows[rowIndex];
      for (int fileIndex = 0; fileIndex < selectedRawDataFiles.length; fileIndex++) {
        RawDataFile rawDataFile = selectedRawDataFiles[fileIndex];
        ChromatographicPeak p = peakListRow.getPeak(rawDataFile);
        if (p != null) {
          if (useArea)
            rawData[fileIndex][rowIndex] = p.getArea();
          else
View Full Code Here

  @Override
  public ExitCode showSetupDialog() {

    PeakList selectedPeakList[] = getParameter(peakLists).getValue();

    RawDataFile dataFileChoices[];

    if ((selectedPeakList != null) && (selectedPeakList.length == 1)) {
      dataFileChoices = selectedPeakList[0].getRawDataFiles();
    } else {
      dataFileChoices = new RawDataFile[0];
View Full Code Here

      if (predictedPattern == null)
        return;

      ChromatographicPeak peak = peakListRow.getBestPeak();

      RawDataFile dataFile = peak.getDataFile();
      int scanNumber = peak.getRepresentativeScanNumber();
      SpectraVisualizerModule.showNewSpectrumWindow(dataFile, scanNumber,
          null, peak.getIsotopePattern(), predictedPattern);

    }

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

      ChromatographicPeak bestPeak = peakListRow.getBestPeak();

      RawDataFile dataFile = bestPeak.getDataFile();
      int msmsScanNumber = bestPeak.getMostIntenseFragmentScanNumber();

      if (msmsScanNumber < 1)
        return;
View Full Code Here

  public void fillList(boolean masterList) {
    for (int i = 0; i < peakList.getNumberOfRawDataFiles(); i++) {
      if (i != masterSample) {

        RawDataFile datafile1;
        RawDataFile datafile2;

        if (masterList) {
          datafile1 = peakList.getRawDataFile(masterSample);
          datafile2 = peakList.getRawDataFile(i);
        } else {
View Full Code Here

    double[][] rawData = new double[selectedRawDataFiles.length][selectedRows.length];
    for (int rowIndex = 0; rowIndex < selectedRows.length; rowIndex++) {
      PeakListRow peakListRow = selectedRows[rowIndex];
      for (int fileIndex = 0; fileIndex < selectedRawDataFiles.length; fileIndex++) {
        RawDataFile rawDataFile = selectedRawDataFiles[fileIndex];
        ChromatographicPeak p = peakListRow.getPeak(rawDataFile);
        if (p != null) {
          if (useArea)
            rawData[fileIndex][rowIndex] = p.getArea();
          else
View Full Code Here

  private String datasetTitle;

  public LogratioDataset(PeakList alignedPeakList, ParameterSet parameters) {
    int numOfRows = alignedPeakList.getNumberOfRows();

    RawDataFile groupOneFiles[] = parameters.getParameter(
        LogratioParameters.groupOneFiles).getValue();
    RawDataFile groupTwoFiles[] = parameters.getParameter(
        LogratioParameters.groupTwoFiles).getValue();
    PeakMeasurementType measurementType = parameters.getParameter(
        LogratioParameters.measurementType).getValue();

    // Generate title for the dataset
View Full Code Here

TOP

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

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.