blastReport: Parse NCBI BLAST XML files.

Description Usage Arguments Value Examples

Description

Parse NCBI BLAST XML files.

Usage

1
blastReport(x, asText = FALSE)

Arguments

x

BLAST output in XML format (as file path or character string).

asText

If TRUE the XML BLAST output is passed in as a string instead of a file path.

Value

A BlastReport object.

Examples

 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])

gschofl/blastr documentation built on May 17, 2019, 8:52 a.m.