BlastSeqs: Run BLAST queries from R

View source: R/BlastSeqs.R

BlastSeqsR Documentation

Run BLAST queries from R

Description

Wrapper to run BLAST queries using the commandline BLAST tool directly from R. Can operate on an XStringSet or a FASTA file.

This function requires the BLAST+ commandline tools, which can be downloaded here.

Usage

BlastSeqs(seqs, BlastDB, 
              blastType=c('blastn', 'blastp', 'tblastn', 'blastx', 'tblastx'),
              extraArgs='', verbose=TRUE)

Arguments

seqs

Sequence(s) to run BLAST query on. This can be either an XStringSet or a path to a FASTA file.

BlastDB

Path to FASTA file in a pre-built BLAST Database. These can be built using either MakeBlastDb from R or the commandline makeblastdb function from BLAST+. For more information on building BLAST DBs, see here.

blastType

Type of BLAST query to run. See 'Details' for more information on available types.

extraArgs

Additional arguments to be passed to the BLAST query executed on the command line. This should be a single character string.

verbose

Should output be displayed?

Details

BLAST implements multiple types of search. Available types are the following:

  • blastn: Nucleotide sequences against database of nucleotide sequences

  • blastp: Protein sequences against database of protein sequences

  • tblastn: Protein sequences against translated database of nucleotide sequences

  • blastx: Translated nucleotide sequences against database of protein sequences

  • tblastx: Translated nucleotide sequences against translated database of nucleotide sequences

Different BLAST queries require different inputs. The function will throw an error if the input data does not match expected input for the requested query type.

Input sequences for blastn, blastx, and tblastx should be nucleotide data.

Input sequences for blastp and tblastn should be amino acid data.

Database for blastn, tblastn, tblastx should be nucleotide data.

Database for blastp and blastx should be amino acid data.

Value

Returns a data frame (data.frame) of results of the BLAST query.

Author(s)

Aidan Lakshman ahl27@pitt.edu

See Also

MakeBlastDb

Examples

#

npcooley/SynExtend documentation built on Nov. 15, 2024, 3:02 p.m.