genbank_download_parse: Download and parse sequences from GenBank

Description Usage Arguments Value Examples

View source: R/genbank.R

Description

If the GenBank file does not exist it fetches and writes it. If the file exists it just reads it. It extracts the metadata and return into a a data frame.

Note: use only sequence_keep = TRUE for simple gene sequences, else it may crash

Usage

1
2
3
4
5
6
genbank_download_parse(
  accession,
  directory,
  sequence_keep = TRUE,
  store_file = FALSE
)

Arguments

accession

Character vector of accession numbers

directory

Character, directory name which must end by "/"

sequence_keep

Logical, if FALSE the sequence is not returned in the file data frame

store_file

Logical, if FALSE the file is not stored and the sequence is not returned in the file data frame

Value

Data frame with the metadata information.

Examples

1
gb_metadata <- genbank_download_parse(accession = c("JX015376", "JQ768406", "LT621940"), directory = "genbank/", sequence_keep=TRUE)

vaulot/dvutils documentation built on Nov. 20, 2021, 11:01 a.m.