read.blast: Read BLAST data

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/read.blast.R

Description

Function to read BLAST data generated with standalone BLAST from NCBI.

Usage

1
read.blast(file, sep = "\t")

Arguments

file

character: BLAST file to read in.

sep

the field separator character. Values on each line of the file are separated by this character. Default "\t".

Details

The function reads data which was generated with standalone BLAST from NCBI; see ftp://ftp.ncbi.nih.gov/blast/executables/release/.

Possible steps:
1) Install NCBI BLAST
2) Generate and import database(s)
3) Apply BLAST with options outfmt and out; e.g.
blastn -query Testquery -db Testdatabase -outfmt 6 -out out.txt
or
blastn -query Testquery -db Testdatabase -outfmt 10 -out out.csv
One can also call BLAST from inside R by using function system
system("blastn -query Testquery -db Testdatabase -outfmt 6 -out out.txt")
4) Read in the results
test.res <- read.blast(file = "out.txt")
or
test.res <- read.blast(file = "out.csv", sep = ",")

Value

A data.frame with variables

query.id

character: sequence identifier.

subject.id

character: subject identifier.

identity

numeric: identity between sequences (in percent).

alignment.length

integer: number of nucleotides.

mismatches

integer: number of mismatches.

gap.opens

integer: number of gaps.

q.start

integer: query sequence start.

q.end

integer: query sequence end.

s.start

integer: subject sequence start.

s.end

integer: subject sequence end.

evalue

numeric: evalue.

bit.score

numeric: score value.

Author(s)

Fabienne Flessa Fabienne.Flessa@uni-bayreuth.de,
Alexandra Kehl Alexandra.Kehl@uni-tuebingen.de,
Matthias Kohl Matthias.Kohl@stamats.de

References

Standalone Blast download: https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/LATEST/

Blast News: https://blast.ncbi.nlm.nih.gov/Blast.cgi?CMD=Web&PAGE_TYPE=BlastNews

Flessa, F., Kehl, A., Kohl, M. Analysing diversity and community structures using PCR-RFLP: a new software application. Molecular Ecology Resources 2013 Jul; 13(4):726-33.

See Also

BLASTdata, simMatrix

Examples

1
2
3
4
Dir <- system.file("extdata", package = "RFLPtools") # input directory 
filename <- file.path(Dir, "BLASTexample.txt")
BLAST1 <- read.blast(file = filename)
str(BLAST1)

RFLPtools documentation built on May 4, 2021, 1:06 a.m.