Skip to content

Commit

Permalink
fixed more fails
Browse files Browse the repository at this point in the history
  • Loading branch information
takutosato committed Dec 22, 2023
1 parent e6f806f commit 78260d1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/java/picard/cmdline/CommandLineProgram.java
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ protected boolean parseArgs(final String[] argv) {
final PicardHtsPath picardHtsPath = referenceSequence.getHtsPath();
REFERENCE_SEQUENCE = picardHtsPath == null ?
null :
new File(picardHtsPath.getRawInputString());
new File(picardHtsPath.getURI().getPath()); // Must remove the "file://" prefix

// The TMP_DIR setting section below was moved from instanceMain() to here due to timing issues
// related to checking whether R is installed. Certain programs, such as CollectInsertSizeMetrics
Expand Down
1 change: 1 addition & 0 deletions src/main/java/picard/nio/PicardBucketUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ public static PicardHtsPath getTempFilePath(final String directory, String prefi
}
}

// For local temp file, directory should be null.
public static PicardHtsPath getTempFilePath(String directory, String extension){
return getTempFilePath(directory, "", extension);
}
Expand Down
5 changes: 3 additions & 2 deletions src/test/java/picard/util/IntervalListToolsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,9 @@ private long testerCountOutput(IntervalListTools.Action action, IntervalListTool
private long testerCountOutput(IntervalListTools.Action action, IntervalListTools.Output outputValue, boolean invert,
boolean unique, boolean dontMergeAbutting, Path input1, Path input2,
final boolean cloudOutput) throws IOException {
final String outputDirFullName = cloudOutput ? CLOUD_OUTPUT_DIR : "IntervalListTools";
final PicardHtsPath countOutput = PicardBucketUtils.getTempFilePath(outputDirFullName, ".txt");
final String outputDirFullName = cloudOutput ? CLOUD_OUTPUT_DIR : null;
final String prefix = "IntervalListTools";
final PicardHtsPath countOutput = PicardBucketUtils.getTempFilePath(outputDirFullName, prefix, ".txt");

final List<String> args = buildStandardTesterArguments(action, invert, unique, dontMergeAbutting, input1, input2);
args.add("OUTPUT_VALUE=" + outputValue);
Expand Down

0 comments on commit 78260d1

Please sign in to comment.