use of io.github.msdk.io.netcdf.NetCDFFileExportMethod in project mzmine2 by mzmine.
the class RawDataExportTask method run.
/**
* @see Runnable#run()
*/
public void run() {
try {
setStatus(TaskStatus.PROCESSING);
logger.info("Started export of file " + dataFile + " to " + outFilename);
MZmineToMSDKRawDataFile msdkDataFile = new MZmineToMSDKRawDataFile(dataFile);
if (outFilename.getName().toLowerCase().endsWith("mzml")) {
msdkMethod = new MzMLFileExportMethod(msdkDataFile, outFilename, MzMLCompressionType.ZLIB, MzMLCompressionType.ZLIB);
}
if (outFilename.getName().toLowerCase().endsWith("cdf")) {
msdkMethod = new NetCDFFileExportMethod(msdkDataFile, outFilename);
}
if (isCanceled())
return;
msdkMethod.execute();
setStatus(TaskStatus.FINISHED);
logger.info("Finished export of file " + dataFile + " to " + outFilename);
} catch (Exception e) {
e.printStackTrace();
setStatus(TaskStatus.ERROR);
setErrorMessage("Error in file export: " + e.getMessage());
}
}
Aggregations