@@ -1130,6 +1130,7 @@ private static boolean configureTaskGraph(JComponent parent, Path wd, Path jarPa
1130
1130
1131
1131
CmdCheckCentroid cmdCheckCentroid = new CmdCheckCentroid (true , wd );
1132
1132
addConfig .accept (cmdCheckCentroid , () -> {
1133
+ cmdCheckCentroid .setRun (cmdCheckCentroid .isRun () && !sharedLcmsFiles .isEmpty ());;
1133
1134
if (cmdCheckCentroid .isRun ()) {
1134
1135
return cmdCheckCentroid .configure (jarPath , ramGb , threads , sharedLcmsFiles );
1135
1136
}
@@ -1155,6 +1156,7 @@ private static boolean configureTaskGraph(JComponent parent, Path wd, Path jarPa
1155
1156
final UmpirePanel umpirePanel = Fragpipe .getStickyStrict (UmpirePanel .class );
1156
1157
final CmdUmpireSe cmdUmpire = new CmdUmpireSe (umpirePanel .isRun (), wd );
1157
1158
addConfig .accept (cmdUmpire , () -> {
1159
+ cmdUmpire .setRun (cmdUmpire .isRun () && !sharedLcmsFiles .isEmpty ());
1158
1160
if (cmdUmpire .isRun ()) {
1159
1161
if (!cmdUmpire .configure (parent , isDryRun , jarPath , ramGb , Paths .get (binMsfragger .getBin ()), umpirePanel , sharedLcmsFiles )) {
1160
1162
return false ;
@@ -1188,6 +1190,7 @@ private static boolean configureTaskGraph(JComponent parent, Path wd, Path jarPa
1188
1190
final TreeMap <InputLcmsFile , List <Path >> sharedPepxmlFiles = new TreeMap <>();
1189
1191
1190
1192
addConfig .accept (cmdMsfragger , () -> {
1193
+ cmdMsfragger .setRun (cmdMsfragger .isRun () && !sharedLcmsFiles .isEmpty ());
1191
1194
if (cmdMsfragger .isRun ()) {
1192
1195
if (!cmdMsfragger .configure (parent , isDryRun , jarPath , binMsfragger , fastaFile , tabMsf .getParams (), tabMsf .getNumDbSlices (), ramGb , sharedLcmsFiles , decoyTag , tabWorkflow .hasDataType ("DDA" ), tabWorkflow .hasDataType ("DIA" ), tabWorkflow .hasDataType ("GPF-DIA" ), tabWorkflow .hasDataType ("DIA-Lib" ), tabWorkflow .hasDataType ("WWA" ), cmdUmpire .isRun (), tabRun .isWriteSubMzml ())) {
1193
1196
return false ;
@@ -1225,6 +1228,7 @@ private static boolean configureTaskGraph(JComponent parent, Path wd, Path jarPa
1225
1228
final CmdCrystalc cmdCrystalc = new CmdCrystalc (crystalcPanel .isRun (), wd );
1226
1229
1227
1230
addConfig .accept (cmdCrystalc , () -> {
1231
+ cmdCrystalc .setRun (cmdCrystalc .isRun () && !sharedPepxmlFiles .isEmpty ());
1228
1232
if (cmdCrystalc .isRun ()) {
1229
1233
CrystalcParams ccParams = crystalcPanel .toParams ();
1230
1234
if (threads > 0 ) {
@@ -1245,6 +1249,7 @@ private static boolean configureTaskGraph(JComponent parent, Path wd, Path jarPa
1245
1249
final MSBoosterPanel MSBoosterPanel = Fragpipe .getStickyStrict (MSBoosterPanel .class );
1246
1250
final CmdMSBooster cmdMSBooster = new CmdMSBooster (MSBoosterPanel .isRun (), wd );
1247
1251
addConfig .accept (cmdMSBooster , () -> {
1252
+ cmdMSBooster .setRun (cmdMSBooster .isRun () && !sharedPepxmlFilesFromMsfragger .isEmpty ());
1248
1253
if (cmdMSBooster .isRun ()) {
1249
1254
return cmdMSBooster .configure (parent , ramGb , threads , sharedPepxmlFilesFromMsfragger , MSBoosterPanel .predictRt (), MSBoosterPanel .predictSpectra (), MSBoosterPanel .useCorrelatedFeatures (), tabWorkflow .hasDataType ("DDA" ), tabWorkflow .hasDataType ("DIA" ), tabWorkflow .hasDataType ("GPF-DIA" ), tabWorkflow .hasDataType ("DIA-Lib" ), tabWorkflow .hasDataType ("WWA" ), cmdUmpire .isRun (), tabMsf .isOpenSearch ());
1250
1255
}
@@ -1269,6 +1274,7 @@ private static boolean configureTaskGraph(JComponent parent, Path wd, Path jarPa
1269
1274
1270
1275
final Map <InputLcmsFile , List <Path >> sharedPepxmlFilesBeforePeptideValidation = new HashMap <>();
1271
1276
addConfig .accept (cmdPeptideProphet , () -> {
1277
+ cmdPeptideProphet .setRun (cmdPeptideProphet .isRun () && !sharedPepxmlFiles .isEmpty ());
1272
1278
sharedPepxmlFilesBeforePeptideValidation .putAll (sharedPepxmlFiles );
1273
1279
if (cmdPeptideProphet .isRun ()) {
1274
1280
final String pepProphCmd = pepProphPanel .getCmdOpts ();
@@ -1301,6 +1307,7 @@ private static boolean configureTaskGraph(JComponent parent, Path wd, Path jarPa
1301
1307
});
1302
1308
1303
1309
addConfig .accept (cmdPercolator , () -> {
1310
+ cmdPercolator .setRun (cmdPercolator .isRun () && !sharedPepxmlFilesBeforePeptideValidation .isEmpty ());
1304
1311
if (cmdPercolator .isRun ()) {
1305
1312
final String percolatorCmd = percolatorPanel .getCmdOpts ();
1306
1313
if (!cmdPercolator .configure (parent , jarPath , percolatorCmd , isCombinedPepxml_percolator , sharedPepxmlFilesBeforePeptideValidation , crystalcPanel .isRun (), percolatorPanel .getMinProb (), decoyTag , tabMsf .isWriteCalMzml () && tabMsf .getMassCalibration () > 0 , tabRun .isWriteSubMzml ())) {
@@ -1320,13 +1327,13 @@ private static boolean configureTaskGraph(JComponent parent, Path wd, Path jarPa
1320
1327
final PtmProphetPanel panelPtmProphet = Fragpipe .getStickyStrict (PtmProphetPanel .class );
1321
1328
final CmdPtmProphet cmdPtmProphet = new CmdPtmProphet (panelPtmProphet .isRun (), wd );
1322
1329
addConfig .accept (cmdPtmProphet , () -> {
1323
-
1324
1330
// PeptideProphet is run, so we run adjustments of the pepxml files.
1325
1331
List <Tuple2 <InputLcmsFile , Path >> lcmsToPepxml = Seq .seq (sharedPepxmlFiles )
1326
1332
.flatMap (tuple -> tuple .v2 .stream ().map (o -> new Tuple2 <>(tuple .v1 , o )))
1327
1333
.toList ();
1328
1334
1329
- if (panelPtmProphet .isRun ()) {
1335
+ cmdPtmProphet .setRun (cmdPtmProphet .isRun () && !lcmsToPepxml .isEmpty ());
1336
+ if (cmdPtmProphet .isRun ()) {
1330
1337
return cmdPtmProphet .configure (parent , panelPtmProphet .getCmdLineOpts (), lcmsToPepxml , threads );
1331
1338
}
1332
1339
return true ;
@@ -1339,6 +1346,7 @@ private static boolean configureTaskGraph(JComponent parent, Path wd, Path jarPa
1339
1346
final CmdProteinProphet cmdProteinProphet = new CmdProteinProphet (isRunProteinProphet , wd );
1340
1347
1341
1348
addConfig .accept (cmdProteinProphet , () -> {
1349
+ cmdProteinProphet .setRun (cmdProteinProphet .isRun () && !sharedPepxmlFiles .isEmpty ());
1342
1350
final boolean isMuiltiExperimentReport = sharedLcmsFileGroups .size () > 1 ;
1343
1351
if (cmdProteinProphet .isRun ()) {
1344
1352
final String protProphCmdStr = protProphPanel .getCmdOpts ();
@@ -1351,17 +1359,15 @@ private static boolean configureTaskGraph(JComponent parent, Path wd, Path jarPa
1351
1359
return true ;
1352
1360
});
1353
1361
1354
- final boolean isReport = reportPanel .isRun ();
1355
1362
final QuantPanelLabelfree quantPanelLabelfree = Fragpipe
1356
1363
.getStickyStrict (QuantPanelLabelfree .class );
1357
1364
final boolean isFreequant = quantPanelLabelfree .isRunFreeQuant ();
1358
1365
1359
1366
// run Report - DbAnnotate
1360
- final boolean isDbAnnotate = isReport ;
1361
- final CmdPhilosopherDbAnnotate cmdPhilosopherDbAnnotate = new CmdPhilosopherDbAnnotate (
1362
- isDbAnnotate , wd );
1367
+ final CmdPhilosopherDbAnnotate cmdPhilosopherDbAnnotate = new CmdPhilosopherDbAnnotate (reportPanel .isRun (), wd );
1363
1368
1364
1369
addConfig .accept (cmdPhilosopherDbAnnotate , () -> {
1370
+ cmdPhilosopherDbAnnotate .setRun (cmdPhilosopherDbAnnotate .isRun () && !sharedPepxmlFiles .isEmpty ());
1365
1371
if (cmdPhilosopherDbAnnotate .isRun ()) {
1366
1372
return cmdPhilosopherDbAnnotate
1367
1373
.configure (parent , ramGb , threads , usePhi , fastaFile , decoyTag , sharedPepxmlFiles .firstKey ());
@@ -1370,7 +1376,7 @@ private static boolean configureTaskGraph(JComponent parent, Path wd, Path jarPa
1370
1376
});
1371
1377
1372
1378
// run Report - Filter
1373
- final CmdPhilosopherFilter cmdPhilosopherFilter = new CmdPhilosopherFilter (isReport , wd );
1379
+ final CmdPhilosopherFilter cmdPhilosopherFilter = new CmdPhilosopherFilter (reportPanel . isRun () , wd );
1374
1380
1375
1381
addCheck .accept (() -> {
1376
1382
if (cmdPhilosopherFilter .isRun ()) {
@@ -1380,6 +1386,7 @@ private static boolean configureTaskGraph(JComponent parent, Path wd, Path jarPa
1380
1386
});
1381
1387
1382
1388
addConfig .accept (cmdPhilosopherFilter , () -> {
1389
+ cmdPhilosopherFilter .setRun (cmdPhilosopherFilter .isRun () && !sharedPepxmlFiles .isEmpty ());
1383
1390
if (cmdPhilosopherFilter .isRun ()) {
1384
1391
final boolean isCheckFilterNoProtxml = reportPanel .isNoProtXml ();
1385
1392
@@ -1435,11 +1442,12 @@ private static boolean configureTaskGraph(JComponent parent, Path wd, Path jarPa
1435
1442
final TmtiPanel tmtiPanel = Fragpipe .getStickyStrict (TmtiPanel .class );
1436
1443
1437
1444
// run Report - Report command itself
1438
- final CmdPhilosopherReport cmdPhilosopherReport = new CmdPhilosopherReport (isReport , wd );
1445
+ final CmdPhilosopherReport cmdPhilosopherReport = new CmdPhilosopherReport (reportPanel . isRun () , wd );
1439
1446
final boolean doPrintDecoys = reportPanel .isPrintDecoys ();
1440
1447
final boolean doMSstats = reportPanel .isMsstats () && !quantPanelLabelfree .isRunIonQuant (); // Don't let Philosopher generate MSstats files if IonQuant is going to run because IonQuant will generate them.
1441
1448
1442
1449
addConfig .accept (cmdPhilosopherReport , () -> {
1450
+ cmdPhilosopherReport .setRun (cmdPhilosopherReport .isRun () && !sharedMapGroupsToProtxml .isEmpty ());
1443
1451
if (cmdPhilosopherReport .isRun ()) {
1444
1452
final boolean isMultiExpReport = sharedLcmsFileGroups .size () > 1 ;
1445
1453
return cmdPhilosopherReport .configure (parent , ramGb , threads , usePhi , doPrintDecoys , doMSstats , isMultiExpReport , reportPanel .isRemoveContaminants (), sharedMapGroupsToProtxml );
@@ -1475,8 +1483,9 @@ private static boolean configureTaskGraph(JComponent parent, Path wd, Path jarPa
1475
1483
});
1476
1484
1477
1485
// run Report - Freequant (Labelfree)
1478
- final CmdFreequant cmdFreequant = new CmdFreequant (isReport && isFreequant , wd );
1486
+ final CmdFreequant cmdFreequant = new CmdFreequant (reportPanel . isRun () && isFreequant , wd );
1479
1487
addConfig .accept (cmdFreequant , () -> {
1488
+ cmdFreequant .setRun (cmdFreequant .isRun () && !sharedMapGroupsToProtxml .isEmpty ());
1480
1489
if (cmdFreequant .isRun ()) {
1481
1490
return cmdFreequant .configure (parent , usePhi , quantPanelLabelfree .getFreequantOptsAsText (), sharedMapGroupsToProtxml , tmtiPanel .isRun (), tabMsf .isOpenSearch ());
1482
1491
}
@@ -1487,6 +1496,7 @@ private static boolean configureTaskGraph(JComponent parent, Path wd, Path jarPa
1487
1496
PTMSGlycanAssignPanel ptmsGlycanPanel = Fragpipe .getStickyStrict (PTMSGlycanAssignPanel .class );
1488
1497
final CmdAppendFile cmdAppendFile = new CmdAppendFile (ptmsGlycanPanel .isRun () && quantPanelLabelfree .isRunIonQuant (), wd );
1489
1498
addConfig .accept (cmdAppendFile , () -> {
1499
+ cmdAppendFile .setRun (cmdAppendFile .isRun () && !sharedPepxmlFilesFromMsfragger .isEmpty ());
1490
1500
if (cmdAppendFile .isRun ()) {
1491
1501
return cmdAppendFile .configure (parent , jarPath ,"modmasses_ionquant.txt" , "ptm-shepherd-output/glyco_masses_list.txt" );
1492
1502
}
@@ -1521,6 +1531,7 @@ private static boolean configureTaskGraph(JComponent parent, Path wd, Path jarPa
1521
1531
modMassSet .addAll (tabMsf .getMassOffsetSet ());
1522
1532
1523
1533
addConfig .accept (cmdIonquant , () -> {
1534
+ cmdIonquant .setRun (cmdIonquant .isRun () && !sharedPepxmlFilesFromMsfragger .isEmpty ());
1524
1535
if (cmdIonquant .isRun ()) {
1525
1536
OPairPanel oPairPanel = Bus .getStickyEvent (OPairPanel .class );
1526
1537
if (oPairPanel == null ) {
@@ -1535,11 +1546,11 @@ private static boolean configureTaskGraph(JComponent parent, Path wd, Path jarPa
1535
1546
1536
1547
// run TMT-Integrator
1537
1548
final boolean isTmt = tmtiPanel .isRun ();
1538
- final boolean isTmtLqFq = tmtiPanel .isRunFqLq ();
1549
+ final boolean isTmtLqFq = isTmt && tmtiPanel .isRunFqLq ();
1539
1550
final CmdTmtIntegrator cmdTmt = new CmdTmtIntegrator (isTmt , wd );
1540
1551
1541
1552
addConfig .accept (cmdTmt , () -> {
1542
- if (isTmt ) {
1553
+ if (isTmt && ! sharedMapGroupsToProtxml . isEmpty () ) {
1543
1554
if (sharedLcmsFiles .stream ().anyMatch (f -> !f .getPath ().getFileName ().toString ().toLowerCase ().endsWith (".mzml" ) && !f .getPath ().getFileName ().toString ().toLowerCase ().endsWith (".raw" ))) {
1544
1555
SwingUtils .showWarningDialog (parent , CmdTmtIntegrator .NAME + " only supports mzML and raw files.\n Please remove other files from the input list." , CmdTmtIntegrator .NAME + " error" );
1545
1556
return false ;
@@ -1569,6 +1580,7 @@ private static boolean configureTaskGraph(JComponent parent, Path wd, Path jarPa
1569
1580
return true ;
1570
1581
});
1571
1582
addConfig .accept (cmdTmtFreequant , () -> {
1583
+ cmdTmtFreequant .setRun (cmdTmtFreequant .isRun () && !sharedMapGroupsToProtxml .isEmpty ());
1572
1584
if (cmdTmtFreequant .isRun ()) {
1573
1585
return cmdTmtFreequant .configure (parent , usePhi , quantPanelLabelfree .getFreequantOptsAsText (), sharedMapGroupsToProtxml , tmtiPanel .isRun (), tabMsf .isOpenSearch ());
1574
1586
}
@@ -1604,6 +1616,7 @@ private static boolean configureTaskGraph(JComponent parent, Path wd, Path jarPa
1604
1616
});
1605
1617
1606
1618
addConfig .accept (cmdTmtLabelQuant , () -> {
1619
+ cmdTmtLabelQuant .setRun (cmdTmtLabelQuant .isRun () && !sharedMapGroupsToProtxml .isEmpty ());
1607
1620
if (cmdTmtLabelQuant .isRun ()) {
1608
1621
QuantLabel label = tmtiPanel .getSelectedLabel ();
1609
1622
String quantLevel = tmtiPanel .getQuantLevel ();
@@ -1621,6 +1634,7 @@ private static boolean configureTaskGraph(JComponent parent, Path wd, Path jarPa
1621
1634
final OPairPanel oPairPanel = Fragpipe .getStickyStrict (OPairPanel .class );
1622
1635
CmdPairScans cmdPairScans = new CmdPairScans (oPairPanel .isRun (), wd );
1623
1636
addConfig .accept (cmdPairScans , () -> {
1637
+ cmdPairScans .setRun (cmdPairScans .isRun () && !sharedLcmsFiles .isEmpty ());
1624
1638
if (cmdPairScans .isRun ()) {
1625
1639
return cmdPairScans .configure (parent , Paths .get (binMsfragger .getBin ()), jarPath , ramGb , threads , sharedLcmsFiles , oPairPanel .getOPairParams ());
1626
1640
}
@@ -1631,6 +1645,7 @@ private static boolean configureTaskGraph(JComponent parent, Path wd, Path jarPa
1631
1645
CmdOPair cmdOPair = new CmdOPair (oPairPanel .isRun (), wd );
1632
1646
OPairParams oPairParams = oPairPanel .getOPairParams ();
1633
1647
addConfig .accept (cmdOPair , () -> {
1648
+ cmdOPair .setRun (cmdOPair .isRun () && !sharedMapGroupsToProtxml .isEmpty ());
1634
1649
if (cmdOPair .isRun ()) {
1635
1650
return cmdOPair .configure (parent , wd , sharedMapGroupsToProtxml , oPairParams , isDryRun , tabMsf .isWriteCalMzml () && tabMsf .getMassCalibration () > 0 , threads );
1636
1651
}
@@ -1654,6 +1669,7 @@ private static boolean configureTaskGraph(JComponent parent, Path wd, Path jarPa
1654
1669
return true ;
1655
1670
});
1656
1671
addConfig .accept (cmdPtmshepherd , () -> {
1672
+ cmdPtmshepherd .setRun (cmdPtmshepherd .isRun () && !sharedMapGroupsToProtxml .isEmpty ());
1657
1673
if (cmdPtmshepherd .isRun ()) {
1658
1674
Path fastaPath = Paths .get (fastaFile );
1659
1675
Map <String , String > additionalShepherdParams = ptmsPanel .toPtmsParamsMap ();
@@ -1696,14 +1712,17 @@ private static boolean configureTaskGraph(JComponent parent, Path wd, Path jarPa
1696
1712
1697
1713
// run TMT-Integrator a second time to provide unmodified peptide data as well as modified (does NOT rerun freequant/labelquant)
1698
1714
addConfig .accept (cmdTmtFpop , () -> {
1715
+ cmdTmtFpop .setRun (cmdTmtFpop .isRun () && !sharedMapGroupsToProtxml .isEmpty ());
1699
1716
if (sharedLcmsFiles .stream ().anyMatch (f -> !f .getPath ().getFileName ().toString ().toLowerCase ().endsWith (".mzml" ) && !f .getPath ().getFileName ().toString ().toLowerCase ().endsWith (".raw" ))) {
1700
1717
SwingUtils .showWarningDialog (parent , CmdTmtIntegrator .NAME + " only supports mzML and raw files.\n Please remove other files from the input list." , CmdTmtIntegrator .NAME + " error" );
1701
1718
return false ;
1702
1719
}
1703
1720
return cmdTmtFpop .configure (tmtiPanel , isDryRun , ramGb , decoyTag , sharedMapGroupsToProtxml , doMSstats , tmtiPanel .getAnnotations (), true );
1704
1721
});
1705
1722
}
1723
+
1706
1724
addConfig .accept (cmdFpopQuant , () -> {
1725
+ cmdFpopQuant .setRun (cmdFpopQuant .isRun () && !sharedMapGroupsToProtxml .isEmpty ());
1707
1726
if (cmdFpopQuant .isRun ()) {
1708
1727
return cmdFpopQuant .configure (parent );
1709
1728
}
@@ -1725,6 +1744,7 @@ private static boolean configureTaskGraph(JComponent parent, Path wd, Path jarPa
1725
1744
return false ;
1726
1745
}
1727
1746
1747
+ cmdSpecLibGen .setRun (cmdSpecLibGen .isRun () && !sharedMapGroupsToProtxml .isEmpty ());
1728
1748
if (cmdSpecLibGen .isRun ()) {
1729
1749
NoteConfigSpeclibgen speclibConf = Fragpipe .getStickyStrict (NoteConfigSpeclibgen .class );
1730
1750
if (!speclibConf .isValid ()) {
@@ -1757,6 +1777,7 @@ private static boolean configureTaskGraph(JComponent parent, Path wd, Path jarPa
1757
1777
// write sub mzML files
1758
1778
final CmdWriteSubMzml cmdWriteSubMzml = new CmdWriteSubMzml (tabRun .isWriteSubMzml (), wd );
1759
1779
addConfig .accept (cmdWriteSubMzml , () -> {
1780
+ cmdWriteSubMzml .setRun (cmdWriteSubMzml .isRun () && !sharedLcmsFileGroups .isEmpty ());
1760
1781
if (cmdWriteSubMzml .isRun ()) {
1761
1782
return cmdWriteSubMzml .configure (parent , jarPath , ramGb , threads , sharedLcmsFileGroups , tabRun .getSubMzmlProbThreshold (), tabMsf .isRun ());
1762
1783
}
0 commit comments