blastTools: Call BLAST and/or read results from a BLAST query

readBlastOutputR Documentation

Call BLAST and/or read results from a BLAST query

Description

Wrapper functions to implement a call to BLAST, and turn the results of a BLAST query into an R table.

Usage

callBlast( fastafile, outfile = "blastOut.txt", program = "blastn", db = "nt",
	path = Sys.getenv("BLASTINDEX_PATH"), task = "", wordsize = 8, evalue = 1, 
	threads = 4, outfmt = 6, filter = "no", maxhits = 5, blastArgs = "")
callBlastn( fastafile, outfile = "blastOut.txt", program = "blastn", db = "NT/nt",
	path = Sys.getenv("BLASTINDEX_PATH"), task = "", wordsize = 8, evalue = 1, 
	threads = 4, outfmt = 6, filter = "no", maxhits = 5, blastArgs = "")
callBlastp( fastafile, outfile = "blastOut.txt", program = "blastp", db = "NR/nr",
	path = Sys.getenv("BLASTINDEX_PATH"), task = "", wordsize = 3, evalue = 1, 
	threads = 4, outfmt = 6, filter = "no", maxhits = 5, blastArgs = "")

readBlastOutput( infile, outfmt = 6, verbose = TRUE, nKeep = NULL)

Arguments

fastafile

Character string, full pathname to an existing FASTA file of query sequences to submit to BLAST.

outfile

Character string, full pathname for the resulting output from BLAST.

program

Character string, full pathname for the executable version of BLAST. Passed to Sys.which for lookup via PATH environment variable.

db

Character string, name of the BLAST database to search against.

path

Character string, full pathname to the folder containing the BLAST database files.

outfmt

Blast output mode. Currently, only outfmt = 6 is supported.

infile

Character string, full pathname to an existing file created by BLAST using output mode '-outfmt=6'.

nKeep

When NULL, keep all BLAST hits for each query sequence, else an integer specifying the maximum number of BLAST matches to return for each query. Only the highest scoring nKeep hits will be returned for each query string.

Details

The BLAST command line details and result format assume a BLAST version of at least 2.2.25

Value

For the calls to BLAST, no return value, just a file of results written to disk.

For reaedBlastOutput, a data frame with columns: PROBE_ID, SEQ_ID, PCT_MATCH, LEN_MATCH, MIS_MATCH, GAP, P_FIRST, P_LAST, S_BEG, S_END, E_VALUE, SCORE, STRAND that contains the BLAST results from the file.


robertdouglasmorrison/DuffyTools documentation built on April 16, 2024, 6:31 a.m.