search.GB: Searches for and downloads DNA sequences from GenBank

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/search.GB.R

Description

This function searches GenBank and downloads DNA sequences for the given taxon.

Usage

1
search.GB(taxon, records = 200, output = "DNAbin")

Arguments

taxon

A character vector of the names of the taxa of interest.

records

Numeric. The maximum number of records that should be returned. Default of 200.

output

A character string giving the output format. Default of "DNAbin" which returns an object of class DNAbin. Giving "XML" (or anything else for that matter) will return an object of class .

Details

By default, GenBank returns the first 200 results from a search term.

For convenience, by default this function returns the sequences in the DNAbin format. It is also possible to retain the data in XML format, which contains all the data associated with each sequence.

Value

When output = "DNAbin" returns an object of class ‘DNAbin’. This object has the attributes "species", "accession_num", and "gene".

When output = "XML" returns an object of class xxxxxx. Data can be extracted from this object using the tools provided by the XML package.

Author(s)

Samuel Brown <s_d_j_brown@hotmail.com>

References

BOLD version 3.0 http://v3.boldsystems.org/.

See Also

read.GB.

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
search.GB(c("Danio kyathit", "Dolomedes", "Sitona discoideus"))

pisaDNA <- search.GB("Pisauridae")

pisaXML <- search.GB("Pisauridae", output = "XML")


## End(Not run)

spiderDev documentation built on May 2, 2019, 5:23 p.m.