java.lang.Object
com.compomics.util.experiment.io.mass_spectrometry.ms2.Ms2Exporter
All Implemented Interfaces:
AutoCloseable

public class Ms2Exporter extends Object implements AutoCloseable
This class writes spectrum files in MS2 format.
Author:
Marc Vaudel, Harald Barsnes
  • Constructor Details

    • Ms2Exporter

      public Ms2Exporter()
      Empty default constructor.
    • Ms2Exporter

      public Ms2Exporter(File destinationFile)
      Constructor.
      Parameters:
      destinationFile - the file where to write
  • Method Details

    • writeHeader

      public void writeHeader()
      Writes the header of the file.
    • writeSpectrum

      public void writeSpectrum(Spectrum spectrum, int scanNumber)
      Writes the given spectrum in ms2 format.
      Parameters:
      spectrum - the spectrum to write
      scanNumber - the scan number
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable