diff --git a/SequenceAnalysis/build.gradle b/SequenceAnalysis/build.gradle index b3b486d2a..056131573 100644 --- a/SequenceAnalysis/build.gradle +++ b/SequenceAnalysis/build.gradle @@ -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", diff --git a/SequenceAnalysis/src/org/labkey/sequenceanalysis/run/util/FastqcRunner.java b/SequenceAnalysis/src/org/labkey/sequenceanalysis/run/util/FastqcRunner.java index 8252c7876..3a2c67599 100644 --- a/SequenceAnalysis/src/org/labkey/sequenceanalysis/run/util/FastqcRunner.java +++ b/SequenceAnalysis/src/org/labkey/sequenceanalysis/run/util/FastqcRunner.java @@ -368,7 +368,7 @@ private List 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()); @@ -403,6 +403,27 @@ private List getBaseParams() throws FileNotFoundException return params; } + private File findJar(final File libDir, final String prefix) + { + if (!libDir.exists()) + { + throw new RuntimeException("Missing directory: " + libDir); + } + + List 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;