Check whether a path/name corresponds to a BLAST DB (heuristic). Check if all the files of a BLAST DB exist (.psq .pog .pin .phr .pos .pto .pot .pdb .ptf .pjs). This checks the directory for filenames that start with the provided basename and have extensions commonly produced by makeblastdb:
protein: .phr .pin .psq
nucleotide: .nhr .nin .nsq
It returns a list with a boolean is_db, a guessed type ("Protein"/"Nucleotide"/"Mixed"/"Unknown"),
a character vector of matching files, and the dir and name used.
isBLASTDB(ptr, input_db)list with keys: is_db (logical), type (string), files (character vector), dir (string), name (string), message (string)
if (FALSE) { # \dontrun{
QuickBLAST::MakeBLASTDB(
blastp_inst,
system.file(
"extdata",
"protein_query.fasta",
package = "QuickBLAST",
mustWork = T
),
"protein_query.db"
)
QuickBLAST::isBLASTDB(
tools::file_path_sans_ext(
system.file(
"extdata",
"protein_query.db.pin",
package = "QuickBLAST",
mustWork = T
)
)
)
} # }