File tree Expand file tree Collapse file tree 2 files changed +24
-2
lines changed
src/org/labkey/sequenceanalysis/run/util Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ dependencies {
135135 BuildUtils . addExternalDependency(
136136 project,
137137 new ExternalDependency (
138- " com.github.broadinstitute:picard:3.1 .0" ,
138+ " com.github.broadinstitute:picard:3.4 .0" ,
139139 " Picard Tools Lib" ,
140140 " PicardTools" ,
141141 " https://github.com/broadinstitute/picard" ,
Original file line number Diff line number Diff line change 4646import java .io .InputStreamReader ;
4747import java .io .StringWriter ;
4848import java .util .ArrayList ;
49+ import java .util .Arrays ;
4950import java .util .HashSet ;
5051import java .util .LinkedList ;
5152import java .util .List ;
@@ -366,7 +367,7 @@ private List<String> getBaseParams() throws FileNotFoundException
366367 throw new RuntimeException ("Not found: " + jbzip2 .getPath ());
367368 }
368369
369- File htsjdkJar = new File (libDir , "htsjdk-4.0.0.jar " );
370+ File htsjdkJar = findJar (libDir , "htsjdk-" );
370371 if (!htsjdkJar .exists ())
371372 {
372373 throw new RuntimeException ("Not found: " + htsjdkJar .getPath ());
@@ -401,6 +402,27 @@ private List<String> getBaseParams() throws FileNotFoundException
401402 return params ;
402403 }
403404
405+ private File findJar (final File libDir , final String prefix )
406+ {
407+ if (!libDir .exists ())
408+ {
409+ throw new RuntimeException ("Missing directory: " + libDir );
410+ }
411+
412+ List <String > jarNames = Arrays .stream (libDir .list ()).filter (fn -> fn .startsWith (prefix )).sorted ().toList ();
413+ if (jarNames .isEmpty ())
414+ {
415+ throw new RuntimeException ("Unable to find JAR with prefix: " + prefix );
416+ }
417+
418+ if (jarNames .size () > 1 )
419+ {
420+ _logger .info ("More than one JAR found with prefix: " + prefix );
421+ }
422+
423+ return new File (libDir , jarNames .get (jarNames .size () - 1 ));
424+ }
425+
404426 private int getThreads ()
405427 {
406428 return _threads ;
You can’t perform that action at this time.
0 commit comments