Skip to contents

Run BLAST for a single sequence and return raw results. For formatted results, use the function BLASTr::get_blastn_results()

Usage

run_blast(
  asv,
  db_path,
  num_alignments = 4,
  num_threads = 1,
  blast_type = "blastn",
  perc_id = 80,
  perc_qcov_hsp = 80,
  verbose = FALSE,
  env_name = "blast-env"
)

Arguments

asv

Vector of sequences to be BLASTed.

db_path

Complete path do formatted BLAST database.

num_alignments

Number of alignments to retrieve from BLAST. Max = 6.

num_threads

Number of threads to run BLAST on. Passed on to BLAST+ argument -num_threads.

blast_type

One of the available BLAST+ search engines, #' one of: c("blastn", "blastp", "blastx", "tblastn", "tblastx").

perc_id

Lowest identity percentage cutoff. Passed on to BLAST+ -perc_identity.

perc_qcov_hsp

Lowest query coverage per HSP percentage cutoff. Passed on to BLAST+ -qcov_hsp_perc.

verbose

Should condathis::run() internal command be shown?

env_name

The name of the conda environment with the parameter (i.e. "blast-env")

Value

Unformatted BLAST results. For results formatted as tibble, please use BLASTr::get_blast_results()

Examples

if (FALSE) { # \dontrun{
blast_res <- BLASTr::run_blast(
  asv = "CTAGCCATAAACTTAAATGAAGCTATACTAAACTCGTTCGCCAG
    AGTACTACAAGCGAAAGCTTAAAACTCATAGGACTTGGCGGTGTTTCAGACCCAC",
  db_path = "/data/databases/nt/nt",
  perc_id = 80,
  num_thread = 1,
  perc_qcov_hsp = 80,
  num_alignments = 2
)
} # }