Skip to content

Commit 1110e02

Browse files
authored
Merge pull request #343 from BimberLab/25.3_fb_htsjdk
Update HTSJDK and picard versions
2 parents 6790e2d + 7a52424 commit 1110e02

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

SequenceAnalysis/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ dependencies {
124124
BuildUtils.addExternalDependency(
125125
project,
126126
new ExternalDependency(
127-
"com.github.broadinstitute:picard:3.1.0",
127+
"com.github.broadinstitute:picard:3.4.0",
128128
"Picard Tools Lib",
129129
"PicardTools",
130130
"https://github.com/broadinstitute/picard",

SequenceAnalysis/src/org/labkey/sequenceanalysis/run/util/FastqcRunner.java

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ private List<String> getBaseParams() throws FileNotFoundException
368368
throw new RuntimeException("Not found: " + jbzip2.getPath());
369369
}
370370

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

406+
private File findJar(final File libDir, final String prefix)
407+
{
408+
if (!libDir.exists())
409+
{
410+
throw new RuntimeException("Missing directory: " + libDir);
411+
}
412+
413+
List<String> jarNames = Arrays.stream(libDir.list()).filter(fn -> fn.startsWith(prefix)).sorted().toList();
414+
if (jarNames.isEmpty())
415+
{
416+
throw new RuntimeException("Unable to find JAR with prefix: " + prefix);
417+
}
418+
419+
if (jarNames.size() > 1)
420+
{
421+
_logger.info("More than one JAR found with prefix: " + prefix);
422+
}
423+
424+
return new File(libDir, jarNames.get(jarNames.size() - 1));
425+
}
426+
406427
private int getThreads()
407428
{
408429
return _threads;

0 commit comments

Comments
 (0)