public class MgfFileWriter extends Object implements AutoCloseable
Constructor and Description |
---|
MgfFileWriter()
Empty default constructor
|
MgfFileWriter(File destinationFile)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static String |
asMgf(String spectrumTitle,
Spectrum spectrum)
Returns the spectrum as an mgf bloc.
|
static String |
asMgf(String spectrumTitle,
Spectrum spectrum,
TreeMap<String,String> additionalTags)
Returns the spectrum as an mgf bloc.
|
void |
close() |
void |
writeSpectrum(String spectrumTitle,
Spectrum spectrum)
Writes the given spectrum to the file.
|
public MgfFileWriter()
public MgfFileWriter(File destinationFile)
destinationFile
- The file where to write.public void writeSpectrum(String spectrumTitle, Spectrum spectrum)
spectrumTitle
- The title of the spectrum to write.spectrum
- The spectrum to write.public void close()
close
in interface AutoCloseable
public static String asMgf(String spectrumTitle, Spectrum spectrum)
spectrumTitle
- The title of the spectrum.spectrum
- The spectrum.public static String asMgf(String spectrumTitle, Spectrum spectrum, TreeMap<String,String> additionalTags)
spectrumTitle
- The title of the spectrum.spectrum
- The spectrum.additionalTags
- additional tags which will be added after the BEGIN
IONS tag in alphabetic orderCopyright © 2021. All rights reserved.