Skip to content

Commit

Permalink
tools: update the BamManager to track the blobfuse2 issue, #TASK-6165
Browse files Browse the repository at this point in the history
On branch TASK-6165
Changes to be committed:
	modified:   biodata-tools/src/main/java/org/opencb/biodata/tools/alignment/BamManager.java
  • Loading branch information
jtarraga committed Jun 20, 2024
1 parent c526731 commit 5a8fcc4
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,11 @@ public BamManager(Path bamFilePath, Path refFilePath) throws IOException {
}

private void init() throws IOException {
FileUtils.checkFile(bamFile);
try {
FileUtils.checkFile(bamFile);
} catch (Exception e) {
e.printStackTrace();
}

if (this.samReader == null) {
SamReaderFactory srf = SamReaderFactory.make();
Expand All @@ -94,7 +98,6 @@ private void init() throws IOException {
}
}
this.samReader = srf.open(SamInputResource.of(bamFile.toFile()));

}

logger = LoggerFactory.getLogger(BamManager.class);
Expand All @@ -121,7 +124,11 @@ public Path createIndex() throws IOException {
* @throws IOException
*/
public Path createIndex(Path outputIndex) throws IOException {
FileUtils.checkDirectory(outputIndex.toAbsolutePath().getParent(), true);
try {
FileUtils.checkDirectory(outputIndex.toAbsolutePath().getParent(), true);
} catch (Exception e) {
e.printStackTrace();
}

SamReaderFactory srf = SamReaderFactory.make().enable(SamReaderFactory.Option.INCLUDE_SOURCE_IN_RECORDS);
srf.validationStringency(ValidationStringency.LENIENT);
Expand Down

0 comments on commit 5a8fcc4

Please sign in to comment.