Learn R Programming

BoSSA (version 1.2)

blast: use NCBI blast

Description

This function use the BLAST URL-API and query either DNA sequences store in object of class "DNAbin" or accession numbers

Usage

blast(X, program = "blastn", database = "nr", entrezquery = "none", nb = 5, oot = 35)

Arguments

X
either an object of class "DNAbin" or a vector of accession numbers
program
specify the BLAST program to use. either "blastn" (default), "blastp", "blastx", "tblastn", "tblastx"
database
specify the database to use. See the reference section
entrezquery
add an entrez query
nb
maximal number of hit to display
oot
out of time parameter. Default correpsond to a maximum of 2 minutes search

Value

the output is a list where each compartment correspond to a blast search. If the query was a "DNAbin" object, there is as many compartment as sequence in the object. If the query was an accession numbers vector, there is as many compartment as accession numbers in the vector. Each blast result is a data.frame with the accession number of the hit, the definition of the hit (i.e. the name), the score and the evalue as colomns.

References

BLAST URL-API : http://www.ncbi.nlm.nih.gov/blast/Doc/urlapi.html

BLAST homepage : http://blast.ncbi.nlm.nih.gov/Blast.cgi

Entrez query : http://www.ncbi.nlm.nih.gov/BLAST/blastcgihelp.shtml

See Also

as.DNAbin

Examples

Run this code
#require internet connexion
#require R4X package, available at http://r-forge.r-project.org/projects/r4x/
#blast("aj865339")
#blast("aj865339",entrezquery="viridiplantae[organism]")

Run the code above in your browser using DataLab