fetch_metadata_chunked: Fetch metadata from GenBank sequences in chunks

View source: R/fetch_metadata.R

fetch_metadata_chunkedR Documentation

Fetch metadata from GenBank sequences in chunks

Description

fetch_metadata() queries the NCBI API online, so we should do this in smaller chunks to avoid errors.

Usage

fetch_metadata_chunked(id, col_select = c("gi", "caption", "taxid",
  "title", "slen", "subtype", "subname"), higher_taxa = FALSE,
  chunk_size = 100)

Arguments

id

Character vector of IDs for GenBank records. Output of rentrez::entrez_search().

col_select

Vector of column names to return.

higher_taxa

Logical; should higher taxonomic ranks (family and order) be included in the results?

chunk_size

Number of rows to use for each chunk.

Value

A list of two items, 'results' and 'error'.

Examples

## Not run: 
fetch_metadata_chunked(c("383212727", "383212725"))

## End(Not run)

joelnitta/gbfetch documentation built on March 2, 2024, 7:03 p.m.