fetch_metadata_from_id: Fetch metadata for a GenBank sequence

fetch_metadata_from_idR Documentation

Fetch metadata for a GenBank sequence

Description

Metadata is obtained in two steps, first with rentrez::entrez_summary(), then with taxize::classification() to get the species name.

Usage

fetch_metadata_from_id(id, col_select = c("gi", "caption", "taxid",
  "title", "slen", "subtype", "subname"), higher_taxa = FALSE,
  .pb = NULL)

Arguments

id

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

col_select

Character vector of metadata columns to include in results. Must include at least 'taxid' so that species can be included. Default values include:

  • giGenbank GI number

  • captionGenbank accession number

  • taxidTaxon ID (can use to query with taxize)

  • titleSequence title

  • slenSequence length

  • subnameMisc. data (specimen, collection country, etc), separated by |

  • subtypeColumn names of misc. data, separated by |

higher_taxa

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

.pb

Internal agument used for setting the progress bar; don't change this.

Details

To see other possible values to use for 'col_select', run rentrez::entrez_summary() with 'db = nucleotide' for a valid ID, e.g. rentrez::entrez_summary(db = "nucleotide", id = "383212727")

Value

Tibble

Examples

## Not run: 
fetch_metadata_from_id("383212727", higher_taxa = TRUE)
fetch_metadata_from_id(c("383212727", "383212725"))

## End(Not run)

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