Search in sources :

Example 1 with AdapMgfExportTask

use of net.sf.mzmine.modules.peaklistmethods.io.adap.mgfexport.AdapMgfExportTask in project mzmine2 by mzmine.

the class GnpsGcExportAndSubmitTask method addAdapMgfTask.

/**
 * Export mgf (adap mgf export) of clustered spectra
 *
 * @param parameters
 * @return
 */
private AbstractTask addAdapMgfTask(ParameterSet parameters) {
    File full = parameters.getParameter(GnpsGcExportAndSubmitParameters.FILENAME).getValue();
    String name = FileAndPathUtil.eraseFormat(full.getName());
    full = FileAndPathUtil.getRealFilePath(full.getParentFile(), name, "mgf");
    ParameterSet mgfParam = MZmineCore.getConfiguration().getModuleParameters(AdapMgfExportModule.class);
    mgfParam.getParameter(AdapMgfExportParameters.FILENAME).setValue(full);
    mgfParam.getParameter(AdapMgfExportParameters.FRACTIONAL_MZ).setValue(true);
    mgfParam.getParameter(AdapMgfExportParameters.REPRESENTATIVE_MZ).setValue(representativeMZ);
    return new AdapMgfExportTask(mgfParam, new PeakList[] { peakList });
}
Also used : ParameterSet(net.sf.mzmine.parameters.ParameterSet) AdapMgfExportTask(net.sf.mzmine.modules.peaklistmethods.io.adap.mgfexport.AdapMgfExportTask) File(java.io.File)

Aggregations

File (java.io.File)1 AdapMgfExportTask (net.sf.mzmine.modules.peaklistmethods.io.adap.mgfexport.AdapMgfExportTask)1 ParameterSet (net.sf.mzmine.parameters.ParameterSet)1