Learn R Programming

micropan (version 1.2)

readBlastTable: Reading BLAST result file

Description

Reading a file produced by the BLAST+ software set up to produce tabular output.

Usage

readBlastTable(blast.file)

Arguments

blast.file

Name of file to read.

Value

The content of the file is returned as a data.frame with 12 columns and one row for each BLAST result. The columns have self-explanatory names.

Details

This function will read files produced by the BLAST+ software where the option -outfmt 6 has been invoked during its call. This option forces BLAST to produce a short tabular text output for each BLAST search. The function blastAllAll produces such files.

See Also

blastAllAll, bDist.

Examples

Run this code
# NOT RUN {
# Using a BLAST result file in this package
xpth <- file.path(path.package("micropan"),"extdata")
blast.file <- file.path( xpth, "GID1_vs_GID2.txt.xz" )

# We need to uncompress it first...
tf <- tempfile(fileext=".xz")
s <- file.copy(blast.file,tf)
tf <- xzuncompress(tf)

#...then we can read it...
blast.table <- readBlastTable(tf)

# ...and deleting temporary file
s <- file.remove(tf)

# }

Run the code above in your browser using DataLab