|
52 | 52 | import java.io.File; |
53 | 53 | import java.io.IOException; |
54 | 54 | import java.nio.file.Files; |
| 55 | +import java.nio.file.Path; |
55 | 56 | import java.util.ArrayList; |
56 | 57 | import java.util.Arrays; |
57 | 58 | import java.util.Collection; |
@@ -637,20 +638,31 @@ public enum Chemistry |
637 | 638 |
|
638 | 639 | public File getInclusionListFile(Logger logger) throws PipelineJobException |
639 | 640 | { |
640 | | - File exe = new CellRangerWrapper(logger).getExe(); |
| 641 | + File exe = new CellRangerWrapper(logger).getExe().getAbsoluteFile(); |
| 642 | + logger.debug("cellranger executable: " + exe.getPath()); |
641 | 643 | if (Files.isSymbolicLink(exe.toPath())) |
642 | 644 | { |
643 | 645 | try |
644 | 646 | { |
645 | | - exe = Files.readSymbolicLink(exe.toPath()).toFile(); |
| 647 | + Path exePath = Files.readSymbolicLink(exe.toPath()); |
| 648 | + logger.debug("cellranger symlink target: " + exePath); |
| 649 | + if (!exePath.isAbsolute()) |
| 650 | + { |
| 651 | + File parent = exe.getParentFile(); |
| 652 | + exePath = parent.toPath().resolve(exePath); |
| 653 | + logger.debug("resolved symlink target: " + exePath); |
| 654 | + } |
| 655 | + |
| 656 | + exe = exePath.toFile(); |
| 657 | + logger.debug("cellranger resolved symlink target: " + exe.getPath()); |
646 | 658 | } |
647 | 659 | catch (IOException e) |
648 | 660 | { |
649 | 661 | throw new PipelineJobException(e); |
650 | 662 | } |
651 | 663 | } |
652 | 664 |
|
653 | | - File il = new File(exe.getParentFile(), "lib/python/cellranger/barcodes/" + _inclusionListFile); |
| 665 | + File il = new File(exe.getParentFile(), "../lib/python/cellranger/barcodes/" + _inclusionListFile); |
654 | 666 | if (!il.exists()) |
655 | 667 | { |
656 | 668 | throw new PipelineJobException("Unable to find file: " + il.getPath()); |
|
0 commit comments