struct
type t = {
name: string;
tmpdir: string option;
max_sequences_for_disk_read_ends_map: int;
max_file_handles_for_read_ends_map: int;
sorting_collection_size_ratio: float;
mem_param: string option;
}
let factory = {
name = "factory";
tmpdir = None;
max_sequences_for_disk_read_ends_map = 50000;
max_file_handles_for_read_ends_map = 8000;
sorting_collection_size_ratio = 0.25;
mem_param = None;
}
let default = {
factory with
name = "default";
max_file_handles_for_read_ends_map = 20_000;
}
let to_java_shell_call ~default_tmp_dir t =
let tmp_dir =
Option.value t.tmpdir ~default:default_tmp_dir in
sprintf "TMPDIR=%s MAX_SEQUENCES_FOR_DISK_READ_ENDS_MAP=%d MAX_FILE_HANDLES_FOR_READ_ENDS_MAP=%d SORTING_COLLECTION_SIZE_RATIO=%f java %s -Djava.io.tmpdir=%s "
tmp_dir
t.max_sequences_for_disk_read_ends_map
t.max_file_handles_for_read_ends_map
t.sorting_collection_size_ratio
(match t.mem_param with
| None -> ""
| Some some -> sprintf "-Xmx%s" some)
tmp_dir
end