Class MsFileExporter
java.lang.Object
com.compomics.util.experiment.io.mass_spectrometry.MsFileExporter
This class writes ms files in various formats.
- Author:
- Marc Vaudel, Harald Barsnes
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnum of the supported export formats. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidwriteAplFile(SpectrumProvider spectrumProvider, boolean includeAllSpectrumLevels, String fileNameWithoutExtension, File destinationFile, SearchParameters searchParameters, WaitingHandler waitingHandler) Writes the spectra of a file in the Andromeda peak list (apl) format.static voidwriteMgfFile(SpectrumProvider spectrumProvider, boolean includeAllSpectrumLevels, String fileNameWithoutExtension, File destinationFile, WaitingHandler waitingHandler) Writes the spectra of a file in the Mascot Generic File (mgf) format.static voidwriteMs2File(SpectrumProvider spectrumProvider, boolean includeAllSpectrumLevels, String fileNameWithoutExtension, File destinationFile, WaitingHandler waitingHandler) Writes the spectra of a file in the ms2 format.static voidwriteMsFile(SpectrumProvider spectrumProvider, boolean includeAllSpectrumLevels, 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, boolean includeAllSpectrumLevels, 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.includeAllSpectrumLevels- If true, all spectrum levels will be included, if false only MS2 spectra are included.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, boolean includeAllSpectrumLevels, 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.includeAllSpectrumLevels- If true, all spectrum levels will be included, if false only MS2 spectra are included.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, boolean includeAllSpectrumLevels, 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.includeAllSpectrumLevels- If true, all spectrum levels will be included, if false only MS2 spectra are included.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, boolean includeAllSpectrumLevels, 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.includeAllSpectrumLevels- If true, all spectrum levels will be included, if false only MS2 spectra are included.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.
-