Trying to retrieve the induced subtree for all birds, using code from GetBoldOToLTree fn:
rotl::tol_induced_subtree(ott_ids=rotl::tnrs_match_names(names = input)$ott_id, label_format = "name", otl_v = otol_version)
and got the following error:
Error: HTTP failure: 400 Queries containing more than 250 strings are not supported. You may submit multiple smaller queries to avoid this
Traced the error to here:
rotl::tnrs_match_names(names = input)$ott_id
Implementing a loop to get ott_ids in batches of 250 solves this issue:
batches <- seq(1,12750, 250) for (i in batches){ aves_ott_ids <- c(aves_ott_ids, rotl::tnrs_match_names(names = aves_names[i:(i+249)])$ott_id) }
I think it's worthy to implement this intoGetBoldOToLTree function too, since, as long as rotl::tnrs_match_names does not allow querying >250 names, trying to construct trees with large sizes with BOLD will not work. What do you think?
Trying to retrieve the induced subtree for all birds, using code from
GetBoldOToLTree
fn:rotl::tol_induced_subtree(ott_ids=rotl::tnrs_match_names(names = input)$ott_id, label_format = "name", otl_v = otol_version)
and got the following error:
Error: HTTP failure: 400 Queries containing more than 250 strings are not supported. You may submit multiple smaller queries to avoid this
Traced the error to here:
rotl::tnrs_match_names(names = input)$ott_id
Implementing a loop to get ott_ids in batches of 250 solves this issue:
batches <- seq(1,12750, 250) for (i in batches){ aves_ott_ids <- c(aves_ott_ids, rotl::tnrs_match_names(names = aves_names[i:(i+249)])$ott_id) }
I think it's worthy to implement this into
GetBoldOToLTree
function too, since, as long as rotl::tnrs_match_names does not allow querying >250 names, trying to construct trees with large sizes with BOLD will not work. What do you think?