ropensci / restez

:sleeping: :open_file_folder: Create and Query a Local Copy of GenBank in R
https://docs.ropensci.org/restez
Other
25 stars 5 forks source link

Joelnitta/issue25 #29

Closed joelnitta closed 2 years ago

joelnitta commented 2 years ago

Description

Add the ability to filter sequences added to database by accession number

Related Issue

Fixes #25

Example

# Example of using `acc_filter`
#
# Download files to temporary directory
temp_dir <- paste0(tempdir(), "/restez", collapse = "")
dir.create(temp_dir)
restez_path_set(filepath = temp_dir)
# Choose GenBank domain 20 ('unannotated'), the smallest
db_download(preselection = 20)
# Only include three accessions in database
db_create(
  acc_filter = c("AF000122", "AF000123", "AF000124")
)
restez_connect()
list_db_ids()
# Cleanup
restez_disconnect()
db_delete()
unlink(temp_dir)