get.fasta: A function to retrieve DNA sequences in fasta format from...

View source: R/get.fasta.R

get.fastaR Documentation

A function to retrieve DNA sequences in fasta format from BOLD

Description

A function to retrieve DNA sequences in fasta format from BOLD using the public API. The user can access public data bsed on taxon, id, bin, container, institution, researchers, geographic location or marker.

Usage

get.fasta(taxon = NULL, ids = NULL, bin = NULL, container = NULL, institutions = NULL, researchers = NULL, geo = NULL, marker = NULL)

Arguments

taxon

Returns all records containing matching taxa, defined in a pipe or comma delimited list. (spaces need to be encoded).Taxa includes scientific names at phylum, class, order, family, subfamily, genus, and species levels.

ids

Returns all records containing matching IDs, defined in a pipe or comma delimited list. (spaces need to be encoded). IDs include Sample IDs, Process IDs, Museum IDs and Field IDs.

bin

Returns all records contained in matching BINs, defined in a pipe or comma delimited list. A BIN is defined by a Barcode Index Number URI.

container

Returns all records contained in matching projects or datasets, defined in a pipe or comma delimited list. Containers include project codes and dataset codes.

institutions

Returns all records stored in matching institutions, defined in a pipe or comma delimited list. Institutions are the Specimen Storing Site (spaces need to be encoded).

researchers

Returns all records containing matching researcher names, defined in a pipe or comma delimited list. Researchers include collectors and specimen identifiers (spaces need to be encoded).

geo

Returns all records collected in matching geographic sites, defined in a pipe or comma delimited list. Geographic sites includes countries and province/states (spaces need to be encoded).

marker

Returns all specimen records containing matching marker codes defined in a pipe or comma delimited list. All markers for a specimen matching the search string will be returned. ie. A record with COI-5P and ITS will return sequence data for both markers even if only COI-5P was specified.

Value

A dataframe which contains the name and the corresponding sequences that were retrieved using the recordset codes entered.

Author(s)

Nishan Mudalige

Examples

## Returns all records matching a project id
## example.df <- get.fasta(container="SSBAA")
## example.df


## Returns all records matching multiple project ids
## example.df <- get.fasta(container=c("SSBAA","SSBAB"))
## example.df


## Returns all records matching multiple project ids
## example.df <- get.fasta(container="SSBAA,SSBAB")
## example.df


## Returns all records matching multiple project ids
## example.df <- get.fasta(container="SSBAA|SSBAB")
## example.df


## Returns all records matching the taxon Bos taurus.
## example.df <- get.fasta(taxon="Bos taurus")
## example.df


## Returns all records matching the taxa Aves or Reptilia
## example.df <- get.fasta(taxon="Aves|Reptilia")
## example.df


## Returns records matching these Process IDs.
## example.df <- get.fasta(ids="ACRJP618-11|ACRJP619-11")
## example.df

## example.df <- get.fasta(ids="Example 10|Example 11|Example 12")
## example.df


## Returns records matching these BIN URIs.
## example.df <- get.fasta(bin="BOLD:AAA5125|BOLD:AAA5126")
## example.df


## Returns records for specimens stored within matching institutions.
## example.df <- get.fasta(institutions="Biodiversity Institute of Ontario|York University")
## example.df


## Returns records for specimens collected or identified by the matching researchers.
## example.df <- get.fasta(researchers="Thibaud Decaens|Rodolphe Rougerie")
## example.df


## Returns records for specimens collected in the matching geographic sites.
## example.df <- get.fasta(geo="Canada|Alaska")
## example.df


## Returns records for specimens collected with the matching marker.
## example.df <- get.fasta(marker="COI-5P")
## example.df

## example.df <- get.fasta(marker="matK|rbcL")
## example.df

nishanmudalige/BOLD.R documentation built on July 15, 2022, 3:33 a.m.