diff --git a/src/main/java/org/broad/igv/sam/reader/SAMReader.java b/src/main/java/org/broad/igv/sam/reader/SAMReader.java index 84ceeebdc..ab87e569c 100644 --- a/src/main/java/org/broad/igv/sam/reader/SAMReader.java +++ b/src/main/java/org/broad/igv/sam/reader/SAMReader.java @@ -69,7 +69,7 @@ public SAMReader(String samFile) throws IOException { this(samFile, true); } - public SAMReader(String samFile, boolean requireIndex) throws IOException { + public SAMReader(String samFile, boolean requireIndex) { this.samFile = samFile; if (requireIndex) { featureIndex = SamUtils.getIndexFor(samFile); @@ -78,7 +78,9 @@ public SAMReader(String samFile, boolean requireIndex) throws IOException { } } factory = SamReaderFactory.makeDefault(). - validationStringency(ValidationStringency.SILENT); + validationStringency(ValidationStringency.SILENT). + referenceSource(new IGVReferenceSource()). + enable(SamReaderFactory.Option.DONT_MEMORY_MAP_INDEX); loadHeader(); } diff --git a/src/main/java/org/broad/igv/sam/reader/SamReaderPool.java b/src/main/java/org/broad/igv/sam/reader/SamReaderPool.java index e18395cc3..1c163badd 100644 --- a/src/main/java/org/broad/igv/sam/reader/SamReaderPool.java +++ b/src/main/java/org/broad/igv/sam/reader/SamReaderPool.java @@ -84,7 +84,8 @@ private SamReader createReader(int bufferSize) throws IOException { boolean isLocal = locator.isLocal(); final SamReaderFactory factory = SamReaderFactory.makeDefault(). referenceSource(new IGVReferenceSource()). - validationStringency(ValidationStringency.SILENT); + validationStringency(ValidationStringency.SILENT). + enable(SamReaderFactory.Option.DONT_MEMORY_MAP_INDEX); SamInputResource resource; if (isLocal) {