File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
src/java/org/broadinstitute/dropseqrna/beadsynthesis Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 4242import picard .nio .PicardHtsPath ;
4343
4444import java .io .File ;
45+ import java .io .IOException ;
4546import java .nio .file .Files ;
4647import java .nio .file .Path ;
4748import java .util .List ;
@@ -161,6 +162,24 @@ protected int doWork() {
161162 if (METRICS != null ) {
162163 barcodeCorrector .writeMetrics (METRICS , getMetricsFile ());
163164 }
165+
166+ try {
167+ if (DELETE_INPUTS ) {
168+ inputPaths .stream ().forEach (p -> Files .delete (p ));
169+ }
170+ if (DELETE_INPUT_INDICES ) {
171+ for (final Path inputBam : inputPaths ) {
172+ final Path index = SamFiles .findIndex (inputBam );
173+ if (index != null && index .toFile ().exists ()) {
174+ Files .delete (index );
175+
176+ }
177+ }
178+ }
179+ } catch (IOException e ) {
180+ throw new RuntimeIOException (e );
181+ }
182+
164183 return 0 ;
165184 }
166185 /** Stock main method, for testing. */
You can’t perform that action at this time.
0 commit comments