/** Closes the underlying resource. */ void close() { if (this.writer != null) { this.writer.close(); } if (this.sorter != null) { this.sorter.doneAdding(); } } }
/** Closes the underlying resource. */ void close() { if (this.writer != null) { this.writer.close(); } if (this.sorter != null) { this.sorter.doneAdding(); } } }
/** * Prepare to iterate through the records in order. This method may be called more than once, * but add() may not be called after this method has been called. */ @Override public CloseableIterator<T> iterator() { if (this.cleanedUp) { throw new IllegalStateException("Cannot call iterator() after cleanup() was called."); } doneAdding(); this.iterationStarted = true; if (this.files.isEmpty()) { return new InMemoryIterator(); } else { return new MergingIterator(); } }
/** * Prepare to iterate through the records in order. This method may be called more than once, * but add() may not be called after this method has been called. */ public CloseableIterator<T> iterator() { if (this.cleanedUp) { throw new IllegalStateException("Cannot call iterator() after cleanup() was called."); } doneAdding(); this.iterationStarted = true; if (this.files.isEmpty()) { return new InMemoryIterator(); } else { return new MergingIterator(); } }
/** * Prepare to iterate through the records in order. This method may be called more than once, * but add() may not be called after this method has been called. */ @Override public CloseableIterator<T> iterator() { if (this.cleanedUp) { throw new IllegalStateException("Cannot call iterator() after cleanup() was called."); } doneAdding(); this.iterationStarted = true; if (this.files.isEmpty()) { return new InMemoryIterator(); } else { return new MergingIterator(); } }
this.representativeReadIndicesForDuplicates.doneAdding();
this.representativeReadIndicesForDuplicates.doneAdding();
collection.doneAdding(); try (SAMFileWriter writer = writerFactory.makeSAMOrBAMWriter(header, true, tmpFile)) { writer.setProgressLogger(new ProgressLogger(log, 10000000));
this.pairSort.doneAdding(); this.fragSort.doneAdding();
this.pairSort.doneAdding(); this.fragSort.doneAdding();
collection.doneAdding(); try (VariantContextWriter writer = processContext.getVariantContextWriter(tmpout, indexed)) { try (CloseableIterator<VariantContext> wit = collection.iterator()) {
sorter.doneAdding(); progress = new ProgressLogger(log, 1000000, "written"); log.info("Writing out sorted records to final VCF.");
sorter.doneAdding(); progress = new ProgressLogger(log, 1000000, "written"); log.info("Writing out sorted records to final VCF.");