Description Usage Arguments Details Value Author(s) Examples
View source: R/blastSequences.R
This function sends a query to NCBI as a string of sequence or an entrez gene ID and then returns a series of MultipleAlignment objects.
1 2 | blastSequences(x, database, hitListSize, filter, expect, program,
timeout=40, as=c("DNAMultipleAlignment", "data.frame", "XML"))
|
x |
A sequence as a character vector or an integer corresponding to an
entrez gene ID. Submit multiple sequences as a length-1 character
vector, |
database |
Which NCBI database to use. If not “blastn”, then set
|
hitListSize |
Number of hits to keep. |
filter |
Sequence filter; “L” for Low Complexity, “R” for Human Repeats, “m” for Mask lookup |
expect |
The BLAST ‘expect’ value above which matches will be returned. |
program |
Which program do you want to use for blast. |
timeout |
Approximate maximum length of time, in seconds, to wait for a result. |
as |
character(1) indicating whether the result from the NCBI server
should be parsed to a list of |
Right now the function only works for "blastn".
The NCBI URL api used by this function is documented at https://www.ncbi.nlm.nih.gov/blast/Doc/urlapi.html
By default, a series of DNAMultipleAlignment
(see
MultipleAlignment-class
objects. Alternatively, a data.frame
or XML document returned
from the NCBI server. The data.frame
is a ‘long form’
representation of the ‘Iteration’, ‘Hit’ and
‘Hsp’ results returned from the server. The XML document is the
result of the xmlParse
function of the XML library, and follows
the format described by
https://www.ncbi.nlm.nih.gov/dtd/NCBI_BlastOutput.dtd and
https://www.ncbi.nlm.nih.gov/dtd/NCBI_BlastOutput.mod.dtd.
M. Carlson
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## x can be an entrez gene ID
blastSequences(17702, timeout=40, as="data.frame")
if (interactive()) {
## or x can be a sequence
blastSequences(x = "GGCCTTCATTTACCCAAAATG")
## hitListSize does not promise that you will get the number of
## matches you want.. It will just try to get that many.
blastSequences(x = "GGCCTTCATTTACCCAAAATG", hitListSize="20")
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.