From 66a70ee74bd4465e325830fc89ef62017ac4ef17 Mon Sep 17 00:00:00 2001 From: Kevin Bui Date: Tue, 13 Dec 2022 11:55:09 -0500 Subject: [PATCH] Fixed the prefix arg. --- .../java/edu/pitt/dbmi/causal/cmd/CausalCmdApplication.java | 2 +- src/main/java/edu/pitt/dbmi/causal/cmd/CmdOptions.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/edu/pitt/dbmi/causal/cmd/CausalCmdApplication.java b/src/main/java/edu/pitt/dbmi/causal/cmd/CausalCmdApplication.java index 96b804e..ed4e141 100644 --- a/src/main/java/edu/pitt/dbmi/causal/cmd/CausalCmdApplication.java +++ b/src/main/java/edu/pitt/dbmi/causal/cmd/CausalCmdApplication.java @@ -130,7 +130,7 @@ public static void main(String[] args) { private static void runTetrad(CmdArgs cmdArgs) throws AlgorithmRunException, ValidationException, IOException { String outDir = cmdArgs.getOutDirectory().toString(); String prefix = cmdArgs.getFilePrefix(); - Path outTxtFile = Paths.get(outDir, String.format("%s.txt", prefix)); + Path outTxtFile = Paths.get(outDir, String.format("%s_out.txt", prefix)); // remove previous files if (Files.exists(outTxtFile)) { diff --git a/src/main/java/edu/pitt/dbmi/causal/cmd/CmdOptions.java b/src/main/java/edu/pitt/dbmi/causal/cmd/CmdOptions.java index c4bbc35..6b11e5f 100644 --- a/src/main/java/edu/pitt/dbmi/causal/cmd/CmdOptions.java +++ b/src/main/java/edu/pitt/dbmi/causal/cmd/CmdOptions.java @@ -190,7 +190,7 @@ private void addOptionalOptions() { options.put(CmdParams.HELP_SCORE_DESC, new Option(null, CmdParams.HELP_SCORE_DESC, false, "Show all the scores along with their descriptions.")); options.put(CmdParams.HELP_TEST_DESC, new Option(null, CmdParams.HELP_TEST_DESC, false, "Show all the independence tests along with their descriptions.")); options.put(CmdParams.VERSION, new Option(null, CmdParams.VERSION, false, "Show version.")); - options.put(CmdParams.FILE_PREFIX, Option.builder().longOpt(CmdParams.FILE_PREFIX).desc("Output file name prefix.").hasArg().argName("string").build()); + options.put(CmdParams.FILE_PREFIX, Option.builder().longOpt(CmdParams.FILE_PREFIX).desc("Replace the default output filename prefix in the format of _.").hasArg().argName("string").build()); options.put(CmdParams.JSON_GRAPH, new Option(null, CmdParams.JSON_GRAPH, false, "Write out graph as json.")); options.put(CmdParams.DIR_OUT, Option.builder().longOpt(CmdParams.DIR_OUT).desc("Output directory").hasArg().argName("directory").build());