MakeBlastDb: Create a BLAST Database from R

View source: R/BlastSeqs.R

MakeBlastDbR Documentation

Create a BLAST Database from R

Description

Wrapper to create BLAST databases for subsequent 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

MakeBlastDb(seqs, dbtype=c('prot', 'nucl'), 
          dbname=NULL, dbpath=NULL,
          extraArgs='', createDirectory=FALSE, 
          verbose=TRUE)

Arguments

seqs

Sequence(s) to create a BLAST database from. This can be either an XStringSet or a path to a FASTA file.

dbtype

Either 'prot' for amino acid input, or 'nucl' for nucleotide input.

dbname

Name of the resulting database. If not provided, defaults to a random string prefixed by blastdb.

dbpath

Path where database should be created. If not provided, defaults to TMPDIR.

extraArgs

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

createDirectory

Should a directory be created for the database if it doesn't exist? If FALSE, the function will throw an error instead of creating a directory.

verbose

Should output be displayed?

Details

This offers a quick way to create BLAST databases from R. This function essentially wraps the makeblastdb commandline function. All arguments supported by makeblastdb are supported in the extraArgs argument.

Value

Returns a length 2 named character vector specifying the name of the BLAST database and the path to it.

Author(s)

Aidan Lakshman ahl27@pitt.edu

See Also

BlastSeqs

Examples

#

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