API Documentation

NCBI

genetic_collections.ncbi_functions.gb_fetch_from_id_list(id_list, batch_size=250, api_key=None)[source]

Orchestrates making calls to the NCBI efetch service, and passes off the XML to the parse_fetch_results function.

Parameters:
  • id_list (list) – List of GenBank IDs – this can be either GIs or Accessions
  • batch_size (int) – The number of results to request at a time – the higher the better, but too large of a result set causes errors
  • api_key (str) – A personal NCBI API key, obtained by creating an NCBI account. An API key is not required, but supplying one will increase API call rate to NCBI from three per second to 10 per second.
Return type:

list of dictionaries

genetic_collections.ncbi_functions.ncbi_taxonomy(gb_fetch_results, batch_size=250, api_key=None)[source]

Orchestrates making calls to the NCBI efetch service, querying the NCBI Taxonomy database for a list of NCBI taxids. Passes off the XML to the ncbi_parse_taxonomy_xml function.

Parameters:
  • gb_fetch_results_list – The unprocessed results of a previous gb_fetch_from_id_list
  • batch_size (int) – The number of results to request at a time – the higher the better, but too large of a result set causes errors
  • api_key (str) – A personal NCBI API key, obtained by creating an NCBI account. An API key is not required, but supplying one will increase API call rate to NCBI from three per second to 10 per second.
Return type:

list of dictionaries