I try to BLAST a list of queries (queries.fasta) against a local mirrors of NCBI nucleotides database (nt
) and taxonomic database (taxdb
).
I run the following script (in R environment):
system2(
blastn,
args = c(
"-db nt",
"-query queries.fasta",
"-out results_r_script.csv",
"-outfmt '6 delim=,
qseqid
sseqid
pident
length
sacc
slen
evalue
bitscore
score
staxids' ",
"-evalue 1e-20",
"-max_target_seqs 5"
)
)
I know that to use the taxonomic database, it is possible to use the taxids
to find species and taxonomic ranks , with the library taxize
for example.
However, I was wondering if it is possible to get these information directly in a single blast, without using subsequent scripts to get taxonomic information?
I ask this as some BLAST command fields as scinames
or sblastnames
do not give any output with a classic nt
BLAST, but might be filled with a script I am not familiar with. If anyone know how, I would be interested in the answer!
If that information is missing from NCBI taxonomy database then it is likely that you won't find it using programs that depend on that database (not sure if
taxize
does).shenwei356 has
taxonkit
(LINK) that you may find useful.But part of it depends on NCBI taxonomy.