bmc_search: Search for gene sequences available for a species from NCBI.

View source: R/bmc_search.r

bmc_searchR Documentation

Search for gene sequences available for a species from NCBI.

Description

Search for gene sequences available for a species from NCBI.

Usage

bmc_search(terms, limit = 10, page = 1, ...)

## S3 method for class 'bmc'
print(x, ...)

Arguments

terms

Search terms.

limit

Number of records to return. Max 25. Default 10.

page

Page number. Only applies if more than 25 results.

...

Further args passed on to httr::GET

x

Object of class bmc from bmc_search

Value

A list.

Examples

## Not run: 
bmc_search(terms = 'ecology')
bmc_search(terms = 'fire', limit=3)
bmc_search(terms = 'fire', limit=2, page=1)
bmc_search(terms = 'fire', limit=2, page=2)

out <- bmc_search(terms = 'fire', limit=5)
out

# Search, then get full text
out <- bmc_search(terms = 'ecology')
out@urls # you could use these to go to the website
out@ids # used to construct download urls in bmc_xml
browseURL(out@urls[1])

# curl debugging help
library('httr')
bmc_search(terms = 'ecology', config=verbose())

## End(Not run)

ropensci/bmc documentation built on May 18, 2022, 9:48 a.m.