let efetch_url ?rettype ?retmode ?retstart ?retmax ?strand ?seq_start ?seq_stop db ids =
if List.length ids > 200
then raise (Invalid_argument "Entrez.efetch_url: cannot fetch more than 200 records") ;
fetch_base_url ^ "?" ^ parameters Option.([
Some ("db", id_of_database db) ;
Some ("id", String.concat ~sep:"," ids) ;
map ~f:(fun r -> "retmode", string_of_retmode r) retmode ;
map ~f:(fun i -> "retstart", string_of_int i) retstart ;
map ~f:(fun i -> "retmax", string_of_int i) retmax ;
map ~f:(fun s -> "strand", match s with `plus -> "1" | `minus -> "2") strand ;
map ~f:(fun i -> "seq_start", string_of_int i) seq_start ;
map ~f:(fun i -> "seq_stop", string_of_int i) seq_stop ;
])