Description Usage Arguments Value Author(s) References Examples
This is a wrapper for blastn.
1 2 3 4 5 6 7 8 9 10 |
query |
Character vector of length one; the path to the fasta file to use as the query sequence(s). |
database |
Character vector of length one; the name of the blast database. |
out_file |
Character vector of length one; the name to use for the results file. |
outfmt |
Character vector of length one; value to pass to
|
other_args |
Character vector; other arguments to pass on to
|
echo |
Logical; should standard error and output be printed? |
wd |
Character vector of length one; working directory. The blast search will be conducted here. |
... |
Additional other arguments. Not used by this function,
but meant to be used by |
A tab-separated text file with the results of the blastn
search, named with the value of out_file
.
Joel H Nitta, joelnitta@gmail.com
https://www.ncbi.nlm.nih.gov/books/NBK279690/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | library(ape)
# Make temp dir for storing files
temp_dir <- fs::dir_create(fs::path(tempdir(), "baitfindR_example"))
# Write out ape::woodmouse dataset as DNA
data(woodmouse)
ape::write.FASTA(woodmouse, fs::path(temp_dir, "woodmouse.fasta"))
# Make blast database
build_blast_db(
fs::path(temp_dir, "woodmouse.fasta"),
db_type = "nucl",
out_name = "wood",
parse_seqids = TRUE,
wd = temp_dir)
# Blast the original sequences against the database
blast_n(
fs::path(temp_dir, "woodmouse.fasta"),
database = "wood",
out_file = "blastn_results",
wd = temp_dir,
echo = TRUE
)
# Take a look at the results.
readr::read_tsv(
fs::path(temp_dir, "blastn_results"),
col_names = FALSE
)
# Cleanup.
fs::file_delete(temp_dir)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.