use of io.github.msdk.datamodel.SimpleRawDataFile in project mzmine2 by mzmine.
the class ExportScansTask method exportmzML.
/**
* Export the chromatogram - mzML format
*
* @throws IOException if there are i/o problems.
*/
public void exportmzML() throws MSDKException {
// Initialize objects
SimpleRawDataFile msdkRawFile = new SimpleRawDataFile("MZmine 2 mzML export", Optional.empty(), FileType.MZML);
for (Scan scan : scans) {
MsScan MSDKscan = new MZmineToMSDKMsScan(scan);
msdkRawFile.addScan(MSDKscan);
}
// Actually write to disk
MzMLFileExportMethod method = new MzMLFileExportMethod(msdkRawFile, exportFile, MzMLCompressionType.ZLIB, MzMLCompressionType.ZLIB);
method.execute();
}
Aggregations