<p>I remember having this problem in the past, it was encoding related. Rewriting the <code>-</code>s manually (the dash sign) should fix the issue, please see <a href="http://www.metagenomics.wiki/tools/blast/error-too-many-positional-arguments" rel="nofollow noreferrer">this</a>.</p>

<blockquote>
  <p>Problem is a copy &amp; past from the BLAST documentation, all dashes
  ('–') need to be replaced by hand at the command line.</p>
</blockquote>

CC BY-SA 4.0
2020-03-06T14:09:15.357Z
Thanks for the comment - I've tried multiple ways to get rid of this, including typing out from hand, copying/pasting, and even copying the '-' that shows up when i type ```blastn -help```, however I'm still getting the same error. Just to be clear, dashes ('-') refer to the 'minus' sign next to 0 right? (I'm a Mac user)
aislinx
CC BY-SA 4.0
2020-03-06T14:26:17.553Z
The only think that I can think of is the `$db` variable. Does it somehow contain whitespaces or any other character that the shell would not understand? If the tilde sign (`~`) is part of what `$db` corresponds to (like in your question), you can try changing it to the exact path of your database.
haci
CC BY-SA 4.0
2020-03-06T14:34:09.893Z
I've just tried ```blastn -db ~/5030/hw2/db -query seqs.fas -out q1results.txt
```
but that just straight up shows me a ```BLAST Database rror: no alias or index file found for nucleotide database in search path```
aislinx
CC BY-SA 4.0
2020-03-06T15:34:06.347Z
This is another error, I guess you point out to the wrong database path.
haci
CC BY-SA 4.0
2020-03-06T15:35:21.450Z
Just to be clear, when i'm doing -db, to which should I refer to: the directory where I have my database, or the entire DB path?
aislinx
CC BY-SA 4.0
2020-03-06T14:06:48.040Z
2020-03-06T14:06:48.040Z
haci
<p>so I'm fairly new to using linux and blast - have encountered an error in my work. </p>

<p>I have created a fasta database with the results in this directory path: 
<code>~/class/hw/db</code></p>

<p>I'm currently trying to run a search against my created database against query sequences in a file called <code>seqs.fas</code>. </p>

<p>My code is as follows: 
<code>blastn -db $db -query seqs.fas -out q1results.txt</code></p>

<p>However I keep getting this error: 
<code>Error: Too many positional arguments (1), the offending value: seqs.fas</code></p>

<p><code>Error:  (CArgException::eSynopsis) Too many positional arguments (1), the offending value: seqs.fas</code></p>

<p>I'm not sure what I'm doing wrong here, and would appreciate any advice to fix this, thanks!</p>

<blastn>
using blastn to search [error]
# using blastn to search [error]

(Asked by: username_0 on 2020-03-06)

so I'm fairly new to using linux and blast - have encountered an error in my work.

I have created a fasta database with the results in this directory path:
`~/class/hw/db`

I'm currently trying to run a search against my created database against query sequences in a file called `seqs.fas`.

My code is as follows:
`blastn -db $db -query seqs.fas -out q1results.txt`

However I keep getting this error:
`Error: Too many positional arguments (1), the offending value: seqs.fas`

`Error: (CArgException::eSynopsis) Too many positional arguments (1), the offending value: seqs.fas`

I'm not sure what I'm doing wrong here, and would appreciate any advice to fix this, thanks!

**Tags:** blastn

---

## 1 answers

### Answer by username_1 on 2020-03-06. Score: 2

I remember having this problem in the past, it was encoding related. Rewriting the `-`s manually (the dash sign) should fix the issue, please see [this](http://www.metagenomics.wiki/tools/blast/error-too-many-positional-arguments).

> Problem is a copy & past from the BLAST documentation, all dashes
> ('–') need to be replaced by hand at the command line.

> **Comments:**
> **username_0**: Thanks for the comment - I've tried multiple ways to get rid of this, including typing out from hand, copying/pasting, and even copying the '-' that shows up when i type ```blastn -help```, however I'm still getting the same error. Just to be clear, dashes ('-') refer to the 'minus' sign next to 0 right? (I'm a Mac user)  
> **username_1**: The only think that I can think of is the `$db` variable. Does it somehow contain whitespaces or any other character that the shell would not understand? If the tilde sign (`~`) is part of what `$db` corresponds to (like in your question), you can try changing it to the exact path of your database.  
> **username_0**: I've just tried ```blastn -db ~/5030/hw2/db -query seqs.fas -out q1results.txt ``` but that just straight up shows me a ```BLAST Database rror: no alias or index file found for nucleotide database in search path```  
> **username_1**: This is another error, I guess you point out to the wrong database path.  
> **username_0**: Just to be clear, when i'm doing -db, to which should I refer to: the directory where I have my database, or the entire DB path?  

---

