Description Usage Arguments Value Examples
Parse NCBI BLAST XML files.
1 | blastReport(x, asText = FALSE)
|
x |
BLAST output in XML format (as file path or character string). |
asText |
If |
A BlastReport
object.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | hla.xml <- system.file("extdata", "HLA-B-UTR.blast.xml", package = "blastr")
x <- blastReport(hla.xml)
## look at the Header
getHeader(x)
## look at the BLAST parameters
getParams(x)
## look at the results of the first query
getQuery(x, 1)
## or easier
x[[1]]
## access the first two hits in the second query
getHit(getQuery(x, 2), 1:2)
## for better readability use piping
## Not run:
library("magrittr")
x %>% getQuery(2) %>% getHit(1:2)
## End(Not run)
## or simple subsetting
x[[2]][1:2]
## it's also possible to access the two best hits for all queries at once
getHit(x, 1:2)
## access the hit ranges
getHitRange(x[[2]][1:2])
## access evalues
getEvalue(x[[2]][1:2])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.