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

Character; Either 'prot' for amino acid input, 'nucl' for nucleotide input, or an unambiguous abbreviation.

dbname

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

dbpath

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

extraArgs

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

createDirectory

Logical; Determines if a directory should be created for the database if it doesn't already exist. If FALSE, the function will throw an error instead of creating a directory.

verbose

Logical; Determines if status messages should be displayed while running.

Details

MakeBlastDb is a barebones wrapper for makeblastdb from the BLAST+ commandline tools. It is set up for convenience purposes only and does not add any additional functionality. Requires a functioning installation of the BLAST+ commandline tools.

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 June 8, 2025, 5:24 a.m.