run_blast: Run BLAST programs

View source: R/run_blast.R

run_blastR Documentation

Run BLAST programs

Description

Runs the BLAST progam and creates BLAST databases

Usage

run_blast(
  input = NULL,
  output = NULL,
  title = NULL,
  database = NULL,
  format = NULL,
  parallel = FALSE,
  cores = 4,
  execute = TRUE,
  blast = NULL,
  version = FALSE
)

Arguments

input

Fasta formatted file for input to makeblastdb or query input fasta for blast

output

Name of output file for blast

title

Title for the blast database

database

Database type e.g. "nucl" 0r "prot", for makeblastdb or database name for blast

format

Output format for blast, numeric e.g 6 is a tabular format

parallel

Run in parallel, default set to FALSE

cores

Number of cores/threads to use for parallel processing, default set to 4

execute

Whether to execute the commands or not, default set to TRUE

blast

Path to the BLAST program

version

Returns the version number

Value

A list with the BLAST commands

Examples

## Not run: 
path_db <- "/software/blast-v2.13.0/bin/makeblastdb"
path_blast <- "/software/blast-v2.13.0/bin/blastn"
or
path_blast <- "/software/blast-v2.13.0/bin/blastp"

version <- run_blast(blast = path_blast,
                     version =TRUE)
version[1]

run_blast(input = "sample1.fasta",
          title = "sample_name",
          database = "nucl",
          blast = path_db)

run_blast(input = "cbp1.fasta",
          output = "sample1.blast",
          database = "blastDB",
          format = 6,
          blast = path_blast)

## End(Not run)


GrahamHamilton/pipelineTools documentation built on March 5, 2024, 12:23 p.m.