Hello,
I want to use blastn
to search a particular query in the fasta format ($QUERY)
- I've created
database
from each.fna
file using `"makeblastdb -in $GENOME -dbtype nucl -parse_seqids" - (for different purposes, I run also
blastcmd
which runs normally without any error --> created databases seem to be correct) I tried to run
blastn
on the same databases with:blastn -db nt $DATABASE_DIR/$GCA/$GCA.fna -query $QUERY -out $file_out -num_threads $CPU -outfmt "6 qseqid sseqid sstart send evalue length qcovs score"
But I receive the error: Error: Too many positional arguments (1), the offending value: <$DATABASE_DIR/$GCA/$GCA.fna>
What I checked so far:
- whether all files exist
- directories
- forums ;) (it is not problem of
"-"
)
I'm using BLAST 2.2.29+ on Ubuntu
I'm not sure if following completely; It's not a basename, but together with
.fna
are different files produced bymakeblastdb
; my$QUERY
is a different.fasta
fileand without
nt
in-db
it creates only an empty result fileThen your databases are likely not created properly. If you are creating a database with a file called
$DATABASE_DIR/$GCA/$GCA.fna
then there will be several files produced with that prefix asbasename
.Having
nt
in addition to the other name creates two inputs to-db
option which leads to the error you are getting.Thank you for suggestion!
Unfortunately, it still does not work... I have checked one more time my database with
blastcmd
and it works fine, but when I tryblastn
it returns an empty fileUse the following to check the database.
I checked my
database
with th check command and it whowed error:So I downloaded one sample genome again, run
makeblastdb
on it, thenblastn
(still returns an empty file), andblastdbcheck
gave the same error;blastcmd
works fine with this databaseThat means your blast databases are not being created properly. Check the log files for the
makeblastdb
to see if that has any usesul information.Create a test db from a small fasta file and make sure there is no problem with your install of blast.
Until the database check command shows no errors, the blast search is not going to work.