public class SpectrumExporter extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
SpectrumExporter.ExportType
Enum of the different types of export implemented.
|
| Constructor and Description |
|---|
SpectrumExporter(com.compomics.util.experiment.identification.Identification identification,
com.compomics.util.experiment.mass_spectrometry.SpectrumProvider spectrumProvider)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
ArrayList<File> |
exportSpectra(File destinationFolder,
com.compomics.util.waiting.WaitingHandler waitingHandler,
SpectrumExporter.ExportType exportType,
com.compomics.util.parameters.identification.advanced.SequenceMatchingParameters sequenceMatchingPreferences)
Exports the spectra from different categories of PSMs according to the
export type.
|
static File |
getDestinationFile(File destinationFolder,
String originalFileName,
SpectrumExporter.ExportType exportType)
Returns the destination file for the given export.
|
static String |
getSuffix(SpectrumExporter.ExportType exportType)
Returns the suffix for a spectrum file name.
|
static boolean |
include(String spectrumFile,
String spectrumTitle,
com.compomics.util.experiment.identification.Identification identification,
com.compomics.util.parameters.identification.advanced.SequenceMatchingParameters sequenceMatchingParameters,
SpectrumExporter.ExportType exportType)
Indicates whether a spectrum should be exported.
|
public SpectrumExporter(com.compomics.util.experiment.identification.Identification identification,
com.compomics.util.experiment.mass_spectrometry.SpectrumProvider spectrumProvider)
identification - The identification object.spectrumProvider - The spectrum provider.public ArrayList<File> exportSpectra(File destinationFolder, com.compomics.util.waiting.WaitingHandler waitingHandler, SpectrumExporter.ExportType exportType, com.compomics.util.parameters.identification.advanced.SequenceMatchingParameters sequenceMatchingPreferences) throws IOException
destinationFolder - the folder where to write the spectrawaitingHandler - waiting handler used to display progress and cancel
the process. Can be null.exportType - the type of PSM to exportsequenceMatchingPreferences - the sequence matching preferencesIOException - thrown if an error occurred while writing the filepublic static File getDestinationFile(File destinationFolder, String originalFileName, SpectrumExporter.ExportType exportType)
destinationFolder - the destination folderoriginalFileName - the original file nameexportType - the export typepublic static boolean include(String spectrumFile, String spectrumTitle, com.compomics.util.experiment.identification.Identification identification, com.compomics.util.parameters.identification.advanced.SequenceMatchingParameters sequenceMatchingParameters, SpectrumExporter.ExportType exportType)
spectrumFile - the name of the file of the spectrumspectrumTitle - the spectrum titleidentification - the identification objectsequenceMatchingParameters - the sequence matching preferencesexportType - the export typepublic static String getSuffix(SpectrumExporter.ExportType exportType)
exportType - the type of PSM to be exportedCopyright © 2021. All rights reserved.