Learn R Programming

RFLPtools (version 2.0)

read.blast: Read BLAST data

Description

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

Usage

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".

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.

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 = ",")

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

Run this code
# NOT RUN {
Dir <- system.file("extdata", package = "RFLPtools") # input directory 
filename <- file.path(Dir, "BLASTexample.txt")
BLAST1 <- read.blast(file = filename)
str(BLAST1)
# }

Run the code above in your browser using DataLab