When I say "aliases" I refer to the name of the blast database is not a file but a name that represents the files.
Example: The makeblastdb produces 3 files with names: T1P1T0.nhr, T1P1T0.nsq and T1P1T0.nal, but the name of the blast database to pass to blastn script is only T1P1T0 without its extensions.
All you need to do is strip the extension off the result of your find command:
e.g.
for i in$(find. -name 'name_of_database.nhr');do
database="${i%.*}"timeblastn -db "$database" -query Sondas_100.fasta -out "$i".out -outfmt 7 -num_threads 16 -dust yes -ungapped
done
Add the extension in the actual find command to ensure it only finds each database once, rather than once per related file, then strip the extension off, and pass the new path which should correspond to the basename of the database.
Do you need an output per DB or will one output over all DBs do it as well?
What exactly do you mean with 'aliases'?
Hi Lieven
When I say "aliases" I refer to the name of the blast database is not a file but a name that represents the files.
Example: The makeblastdb produces 3 files with names: T1P1T0.nhr, T1P1T0.nsq and T1P1T0.nal, but the name of the blast database to pass to blastn script is only T1P1T0 without its extensions.
And yeah! I want a otuput for each database