Skip to content

Commit 1b1dbf6

Browse files
committed
Save manifest and workflow files before running anything.
Some tools might need those files.
1 parent cbff600 commit 1b1dbf6

File tree

2 files changed

+6
-16
lines changed

2 files changed

+6
-16
lines changed

MSFragger-GUI/src/com/dmtavt/fragpipe/FragpipeRun.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,12 @@ public static int run(MessageRun m) {
331331
toConsole("LCMS files:\n" + createLcmsFilesString(lcmsFileGroups), tabRun.console);
332332
toConsole("", tabRun.console);
333333

334+
// save manifest file in both GUI and headless mode
335+
Path pp = wd.resolve("fragpipe-files" + manifestExt);
336+
Bus.post(new MessageManifestSave(pp, true));
337+
338+
saveRuntimeConfig(wd);
339+
334340
// Converting process builders descriptors to process builder infos
335341
final List<ProcessBuilderInfo> pbis = pbDescsBuilderDescs.stream()
336342
.flatMap(pbd -> pbd.pbis.stream().map(pbi ->
@@ -507,11 +513,6 @@ public static int run(MessageRun m) {
507513
String totalTime = String.format("%.1f", (System.nanoTime() - startTime) * 1e-9 / 60);
508514
toConsole(Fragpipe.COLOR_RED_DARKEST, "\n=============================================================ALL JOBS DONE IN " + totalTime + " MINUTES=============================================================", true, tabRun.console);
509515
Bus.post(MessageSaveLog.saveInDir(wd));
510-
saveRuntimeConfig(wd);
511-
512-
// save manifest file in both GUI and headless mode
513-
Path path = wd.resolve("fragpipe-files" + manifestExt);
514-
Bus.post(new MessageManifestSave(path, true));
515516

516517
if (tabRun.isWriteSubMzml()) { // write sub workflow and manifest files for the second-pass
517518
try {

MSFragger-GUI/src/com/dmtavt/fragpipe/cmd/ProcessBuilderInfo.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,11 @@
1818
package com.dmtavt.fragpipe.cmd;
1919

2020
import static com.dmtavt.fragpipe.messages.MessagePrintToConsole.toConsole;
21-
import static com.dmtavt.fragpipe.tabs.TabWorkflow.manifestExt;
2221

2322
import com.dmtavt.fragpipe.Fragpipe;
24-
import com.dmtavt.fragpipe.FragpipeRun;
2523
import com.dmtavt.fragpipe.api.Bus;
2624
import com.dmtavt.fragpipe.messages.MessageKillAll;
2725
import com.dmtavt.fragpipe.messages.MessageKillAll.REASON;
28-
import com.dmtavt.fragpipe.messages.MessageManifestSave;
2926
import com.dmtavt.fragpipe.messages.MessageSaveLog;
3027
import com.dmtavt.fragpipe.process.ProcessResult;
3128
import com.github.chhh.utils.swing.TextConsole;
@@ -135,14 +132,6 @@ public static Runnable toRunnable(final ProcessBuilderInfo pbi, final Path wdPat
135132
toConsole(Fragpipe.COLOR_RED, "Process returned non-zero exit code, stopping", true, console);
136133
Bus.post(new MessageKillAll(REASON.NON_ZERO_RETURN_FROM_PROCESS, console));
137134
Bus.post(MessageSaveLog.saveInDir(wdPath));
138-
FragpipeRun.saveRuntimeConfig(wdPath);
139-
140-
if (!isDownstream) {
141-
// save manifest file in both GUI and headless mode
142-
Path path = wdPath.resolve("fragpipe-files" + manifestExt);
143-
Bus.post(new MessageManifestSave(path, true));
144-
}
145-
146135
break;
147136
}
148137
} catch (IllegalThreadStateException ex) {

0 commit comments

Comments
 (0)