Class Ms2Exporter
java.lang.Object
com.compomics.util.experiment.io.mass_spectrometry.ms2.Ms2Exporter
- All Implemented Interfaces:
AutoCloseable
This class writes spectrum files in MS2 format.
- Author:
- Marc Vaudel, Harald Barsnes
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidWrites the header of the file.voidwriteSpectrum(Spectrum spectrum, int scanNumber) Writes the given spectrum in ms2 format.
-
Constructor Details
-
Ms2Exporter
public Ms2Exporter()Empty default constructor. -
Ms2Exporter
Constructor.- Parameters:
destinationFile- the file where to write
-
-
Method Details
-
writeHeader
public void writeHeader()Writes the header of the file. -
writeSpectrum
Writes the given spectrum in ms2 format.- Parameters:
spectrum- the spectrum to writescanNumber- the scan number
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-