bb_guess_db_type - ampinzonv/BB3 GitHub Wiki

Function: bb_guess_db_type

Determine the type of a BLAST database (nucleotide or protein) based on its index files.


๐Ÿ” Description

This internal utility function checks for the presence of specific BLAST database index files to determine whether a database is nucleotide (nucl) or protein (prot). It is useful for validating database compatibility with query sequences in functions like bb_run_blast. In common cases this function is not intended to be used for final users but by the system, but it could be useful in some specific cases.


๐Ÿ“ฅ Input

  • A path prefix to a BLAST database (e.g., db/mydb)

๐Ÿ“ค Output

  • One of: prot, nucl, or unknown

๐Ÿงช Examples

Check database type:

bb_guess_db_type db/mydatabase

Output might be:

nucl

๐Ÿ“Œ Notes

  • Protein databases have a .pin file.
  • Nucleotide databases have a .nin file.
  • If neither is found, the function returns unknown.