blastn (Error: Too many positional arguments (1))
2
0
Entering edit mode
14 months ago
agata ▴ 10

Hello,

I want to use blastn to search a particular query in the fasta format ($QUERY)

  1. I've created database from each .fna file using `"makeblastdb -in $GENOME -dbtype nucl -parse_seqids"
  2. (for different purposes, I run also blastcmd which runs normally without any error --> created databases seem to be correct)
  3. 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

blastn blast • 2.2k views
ADD COMMENT
0
Entering edit mode
14 months ago
GenoMax 141k
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"

Why do you have a fna file hanging around by itself? Is that supposed to be the query? If that was the basename of the database then you have an extraneous nt in the command.

ADD COMMENT
0
Entering edit mode

I'm not sure if following completely; It's not a basename, but together with .fna are different files produced by makeblastdb; my $QUERY is a different.fasta file

and without nt in -db it creates only an empty result file

ADD REPLY
0
Entering edit mode

without nt in -db it creates only an empty result file

Then 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 as basename.

Having nt in addition to the other name creates two inputs to -db option which leads to the error you are getting.

ADD REPLY
0
Entering edit mode

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 try blastn it returns an empty file

ADD REPLY
0
Entering edit mode

Use the following to check the database.

$  blastdbcheck -h
    USAGE
      blastdbcheck [-h] [-help] [-db DbName] [-dbtype molecule_type]
        [-dir DirName] [-recursive] [-verbosity DefaultKey] [-full]
        [-stride StrideLength] [-random NumSequences] [-ends NumSequences]
        [-no_isam] [-legacy] [-must_have_taxids] [-cdd_delta] [-version]

    DESCRIPTION
       BLAST database integrity and validity checking application
ADD REPLY
0
Entering edit mode

I checked my database with th check command and it whowed error:

Writing messages to <stdout> at verbosity (Summary) ISAM testing is ENABLED. Legacy testing is DISABLED. TaxID testing is DISABLED. By default, testing 200 randomly sampled OIDs. Testing 1 volume(s). database.fna / MetaData: [ERROR] caught exception.

Result=FAILURE. 1 errors reported in 1 volume(s). Testing 0 alias(es). Result=SUCCESS. No errors reported for 0 alias(es). Total errors: 1

So I downloaded one sample genome again, run makeblastdb on it, then blastn (still returns an empty file), and blastdbcheck gave the same error; blastcmd works fine with this database

ADD REPLY
0
Entering edit mode

checked my database with th check command and it whowed error

That 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.

ADD REPLY
0
Entering edit mode
14 months ago
agata ▴ 10

It turned out that blastn produced an empty file, while any hit was found - thus all the setup was okay, just no significant hit were found in the subset of a data that I randomly chose for testing.

¯|_(ツ)_|¯

ADD COMMENT

Login before adding your answer.

Traffic: 2064 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6