Skip to content

Commit fab957a

Browse files
committed
feat: wire disk budget into batch pipeline via run_batch_alignment_with_budget (integrate-wire-batch)
When --max-disk is specified, route batch alignment through run_batch_alignment_with_budget() which monitors disk usage after each target index build and adaptively restarts with smaller batches if the 90% threshold is exceeded. --batch-bytes continues to use the generic batch path without budget enforcement.
1 parent cdebdb7 commit fab957a

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

src/main.rs

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1279,13 +1279,26 @@ fn align_multiple_fastas(
12791279
);
12801280
}
12811281

1282-
return batch_align::run_batch_alignment_generic(
1283-
fasta_files,
1284-
max_index_bytes,
1285-
aligner.as_ref(),
1286-
&batch_config,
1287-
tempdir,
1288-
);
1282+
// When --max-disk is set, use budget-enforced path with adaptive restart;
1283+
// otherwise use the generic batch path (--batch-bytes only).
1284+
if let Some(disk_budget) = max_disk {
1285+
return batch_align::run_batch_alignment_with_budget(
1286+
fasta_files,
1287+
disk_budget,
1288+
max_index_bytes,
1289+
aligner.as_ref(),
1290+
&batch_config,
1291+
tempdir,
1292+
);
1293+
} else {
1294+
return batch_align::run_batch_alignment_generic(
1295+
fasta_files,
1296+
max_index_bytes,
1297+
aligner.as_ref(),
1298+
&batch_config,
1299+
tempdir,
1300+
);
1301+
}
12891302
}
12901303

12911304
// Decide on alignment mode

0 commit comments

Comments
 (0)