Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion SequenceAnalysis/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ dependencies {
BuildUtils.addExternalDependency(
project,
new ExternalDependency(
"com.github.broadinstitute:picard:3.1.0",
"com.github.broadinstitute:picard:3.4.0",
"Picard Tools Lib",
"PicardTools",
"https://github.com/broadinstitute/picard",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ private List<String> getBaseParams() throws FileNotFoundException
throw new RuntimeException("Not found: " + jbzip2.getPath());
}

File htsjdkJar = new File(libDir, "htsjdk-4.0.0.jar");
File htsjdkJar = findJar(libDir, "htsjdk-");
if (!htsjdkJar.exists())
{
throw new RuntimeException("Not found: " + htsjdkJar.getPath());
Expand Down Expand Up @@ -403,6 +403,27 @@ private List<String> getBaseParams() throws FileNotFoundException
return params;
}

private File findJar(final File libDir, final String prefix)
{
if (!libDir.exists())
{
throw new RuntimeException("Missing directory: " + libDir);
}

List<String> jarNames = Arrays.stream(libDir.list()).filter(fn -> fn.startsWith(prefix)).sorted().toList();
if (jarNames.isEmpty())
{
throw new RuntimeException("Unable to find JAR with prefix: " + prefix);
}

if (jarNames.size() > 1)
{
_logger.info("More than one JAR found with prefix: " + prefix);
}

return new File(libDir, jarNames.get(jarNames.size() - 1));
}

private int getThreads()
{
return _threads;
Expand Down