Class MsFileExporter
java.lang.Object
com.compomics.util.experiment.io.mass_spectrometry.MsFileExporter
public class MsFileExporter extends Object
This class writes ms files in various formats.
- Author:
- Marc Vaudel, Harald Barsnes
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MsFileExporter.Format
Enum of the supported export formats. -
Constructor Summary
Constructors Constructor Description MsFileExporter()
-
Method Summary
Modifier and Type Method Description static void
writeAplFile(SpectrumProvider spectrumProvider, String fileNameWithoutExtension, File destinationFile, SearchParameters searchParameters, WaitingHandler waitingHandler)
Writes the spectra of a file in the Andromeda peak list (apl) format.static void
writeMgfFile(SpectrumProvider spectrumProvider, String fileNameWithoutExtension, File destinationFile, WaitingHandler waitingHandler)
Writes the spectra of a file in the Mascot Generic File (mgf) format.static void
writeMs2File(SpectrumProvider spectrumProvider, String fileNameWithoutExtension, File destinationFile, WaitingHandler waitingHandler)
Writes the spectra of a file in the ms2 format.static void
writeMsFile(SpectrumProvider spectrumProvider, String fileNameWithoutExtension, File destinationFile, MsFileExporter.Format format, SearchParameters searchParameters, WaitingHandler waitingHandler)
Writes the spectra of a file in the given format.
-
Constructor Details
-
MsFileExporter
public MsFileExporter()
-
-
Method Details
-
writeMsFile
public static void writeMsFile(SpectrumProvider spectrumProvider, String fileNameWithoutExtension, File destinationFile, MsFileExporter.Format format, SearchParameters searchParameters, WaitingHandler waitingHandler)Writes the spectra of a file in the given format.- Parameters:
spectrumProvider
- The spectrum provider to use to get the spectra.fileNameWithoutExtension
- The name of the file to export.destinationFile
- The file where to write.format
- The format to write in.searchParameters
- The search parameters.waitingHandler
- The waiting handler to use to inform on progress and allow cancelling.
-
writeAplFile
public static void writeAplFile(SpectrumProvider spectrumProvider, String fileNameWithoutExtension, File destinationFile, SearchParameters searchParameters, WaitingHandler waitingHandler)Writes the spectra of a file in the Andromeda peak list (apl) format.- Parameters:
spectrumProvider
- The spectrum provider to use to get the spectra.fileNameWithoutExtension
- The name of the file to export.destinationFile
- The file where to write.searchParameters
- The search parameters.waitingHandler
- The waiting handler to use to inform on progress and allow cancelling.
-
writeMgfFile
public static void writeMgfFile(SpectrumProvider spectrumProvider, String fileNameWithoutExtension, File destinationFile, WaitingHandler waitingHandler)Writes the spectra of a file in the Mascot Generic File (mgf) format.- Parameters:
spectrumProvider
- The spectrum provider to use to get the spectra.fileNameWithoutExtension
- The name of the file to export.destinationFile
- The file where to write.waitingHandler
- The waiting handler to use to inform on progress and allow cancelling.
-
writeMs2File
public static void writeMs2File(SpectrumProvider spectrumProvider, String fileNameWithoutExtension, File destinationFile, WaitingHandler waitingHandler)Writes the spectra of a file in the ms2 format.- Parameters:
spectrumProvider
- The spectrum provider to use to get the spectra.fileNameWithoutExtension
- The name of the file to export.destinationFile
- The file where to write.waitingHandler
- The waiting handler to use to inform on progress and allow cancelling.
-