Skip to content

Commit 8444642

Browse files
author
Jay Carey
authored
[bugfix] Pass MAX_RECORDS_IN_RAM to BasecallsConverter (broadinstitute#1687)
1 parent 828cc4f commit 8444642

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/main/java/picard/illumina/IlluminaBasecallsToSam.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,8 @@ private void initialize() {
312312
.withApplyEamssFiltering(APPLY_EAMSS_FILTER)
313313
.withIncludeNonPfReads(INCLUDE_NON_PF_READS)
314314
.withIgnoreUnexpectedBarcodes(IGNORE_UNEXPECTED_BARCODES)
315-
.withBclQualityEvaluationStrategy(bclQualityEvaluationStrategy);
315+
.withBclQualityEvaluationStrategy(bclQualityEvaluationStrategy)
316+
.withMaxRecordsInRam(MAX_RECORDS_IN_RAM);
316317

317318
if (SORT) {
318319
converterBuilder = converterBuilder
@@ -551,7 +552,7 @@ protected String[] customCommandLineValidation() {
551552
// Remove once deprecated parameter is deleted.
552553
if (MAX_READS_IN_RAM_PER_TILE != -1) {
553554
log.warn("Setting deprecated parameter `MAX_READS_IN_RAM_PER_TILE` use ` MAX_RECORDS_IN_RAM` instead");
554-
MAX_RECORDS_IN_RAM = MAX_READS_IN_RAM_PER_TILE;
555+
MAX_RECORDS_IN_RAM = MAX_READS_IN_RAM_PER_TILE * NUM_PROCESSORS;
555556
}
556557

557558
final ArrayList<String> messages = new ArrayList<>();

src/main/java/picard/illumina/SortedBasecallsConverter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ protected SortedBasecallsConverter(
104104
this.codecPrototype = codecPrototype;
105105
this.outputRecordComparator = outputRecordComparator;
106106
this.outputRecordClass = outputRecordClass;
107-
tileWriteExecutor = new ThreadPoolExecutorWithExceptions(barcodeRecordWriterMap.keySet().size());
107+
tileWriteExecutor = new ThreadPoolExecutorWithExceptions(numThreads);
108108
tileReadExecutor = new ThreadPoolExecutorWithExceptions(numThreads);
109109
}
110110

0 commit comments

Comments
 (0)