Skip to content

Commit

Permalink
INFRA-541 Debug CLI parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
Ned Leitch committed Sep 6, 2024
1 parent 2d5127f commit a8a33cf
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import com.hartwig.hmftools.cup.prep.CuppaDataPrep;

public class PrepPlusPredictionMain {
private static String[] extract(String prefix, String[] allArgs) {
private static String[] extractArgs(String prefix, String[] allArgs) {
List<String> allAsString = Arrays.stream(allArgs).collect(Collectors.toList());
List<String> matchingArgs = new ArrayList<>();
List<String> accumulator = new ArrayList<>();
Expand All @@ -31,8 +31,12 @@ private static String[] extract(String prefix, String[] allArgs) {

public static void main(String[] args) {
try {
CuppaDataPrep.main(extract("prep", args));
PredictionRunner.main(extract("prediction", args));
String[] prepArgs = extractArgs("prep", args);
String[] predArgs = extractArgs("prediction", args);
System.out.println("Prep args: " + String.join(" ", prepArgs));
System.out.println("Prediction args: " + String.join(" ", predArgs));
CuppaDataPrep.main(prepArgs);
PredictionRunner.main(predArgs);
System.exit(0);
} catch (Exception e) {
System.err.println("Failed to run combined Cuppa applications");
Expand Down

0 comments on commit a8a33cf

Please sign in to comment.