@Override public void close() { super.close(); sorter.cleanup(); } }, ADD_MATE_CIGAR, IGNORE_MISSING_MATES);
@Override public void close() { super.close(); alignmentSorter.cleanup(); } };
@Override public void close() { super.close(); sorter.cleanup(); } }, ADD_MATE_CIGAR, IGNORE_MISSING_MATES);
@Override public void close() { super.close(); alignmentSorter.cleanup(); } };
/** * Must be called or else file will likely be defective. */ public final void close() { if (alignmentSorter != null) { for (final SAMRecord alignment : alignmentSorter) { writeAlignment(alignment); if (progressLogger != null) progressLogger.record(alignment); } alignmentSorter.cleanup(); } finish(); }
/** * Must be called or else file will likely be defective. */ @Override public final void close() { if (!isClosed) { if (alignmentSorter != null) { for (final SAMRecord alignment : alignmentSorter) { writeAlignment(alignment); if (progressLogger != null) progressLogger.record(alignment); } alignmentSorter.cleanup(); } finish(); } isClosed = true; }
/** * Must be called or else file will likely be defective. */ @Override public final void close() { if (!isClosed) { if (alignmentSorter != null) { for (final SAMRecord alignment : alignmentSorter) { writeAlignment(alignment); if (progressLogger != null) progressLogger.record(alignment); } alignmentSorter.cleanup(); } finish(); } isClosed = true; }
@Test public void spillToDiskTest() { final SortingCollection<String> sortingCollection = makeSortingCollection(10); final String[] strings = new String[] { "1", "2", "3" }; for (String str : strings) { sortingCollection.add(str); } Assert.assertEquals(tmpDir().list().length, 0); sortingCollection.spillToDisk(); Assert.assertEquals(tmpDir().list().length, 1); assertIteratorEqualsList(strings, sortingCollection.iterator()); sortingCollection.cleanup(); Assert.assertEquals(tmpDir().list().length, 0); }
/** * Generate some strings, put into SortingCollection, confirm that the right number of * Strings come out, and in the right order. * @param numStringsToGenerate * @param maxRecordsInRam */ @Test(dataProvider = "test1") public void testPositive(final String testName, final int numStringsToGenerate, final int maxRecordsInRam) { final String[] strings = new String[numStringsToGenerate]; int numStringsGenerated = 0; final SortingCollection<String> sortingCollection = makeSortingCollection(maxRecordsInRam); for (final String s : new RandomStringGenerator(numStringsToGenerate)) { sortingCollection.add(s); strings[numStringsGenerated++] = s; } Arrays.sort(strings, new StringComparator()); Assert.assertEquals(tmpDirIsEmpty(), numStringsToGenerate <= maxRecordsInRam); sortingCollection.setDestructiveIteration(false); assertIteratorEqualsList(strings, sortingCollection.iterator()); assertIteratorEqualsList(strings, sortingCollection.iterator()); sortingCollection.cleanup(); Assert.assertEquals(tmpDir().list().length, 0); }
sorter.cleanup();
sorter.cleanup();
this.representativeReadIndicesForDuplicates.cleanup();
sink.sorter.cleanup();
sink.sorter.cleanup();