<p>tldr: Remove the <code>$</code> from the command.</p>

<p>I imagine you're literally typing <code>$hisat2</code>, where you mean to instead type <code>hisat2</code>. The <code>$</code> is just meant to show the end of the command prompt. If you actually type <code>$hisat2</code>, you're not executing the hisat2 program, but whatever the <code>$hisat2</code> variable is set to. Since it's likely not set to anything, it's just ignored. For example:</p>

<pre><code>ryan@maximus:~$ $hisat2 ls
bin              convertChromosomesChain.py  ...
</code></pre>

<p>Since there's no <code>$hisat2</code> variable, I'm actually just running <code>ls</code>. Likewise, your command is just reducing to <code>-p 8 --dta -x daphnia_tran -1 C2*R1*.fastq -2 C2*R2*.fastq -S C2paired.sam</code>, which is the source of the error.</p>

CC BY-SA 3.0
2018-03-13T16:05:04.673Z
Can't believe I missed that, thanks very much! The script seems to be running perfectly now.
genome454
CC BY-SA 3.0
2018-03-13T07:59:38.627Z
2018-03-13T07:59:38.627Z
Devon Ryan
<p>I have been attempting to map reads to a reference genome using HISAT2 using the Pertea, et al 2016 Nature Protocols paper. I am able to successfully generate an index (using the hisat2-build command), but when it comes to the actual mapping, I run into problems. The code I'm using (from the paper):</p>

<pre><code>$hisat2 -p 8 --dta -x daphnia_tran -1 C2*R1*.fastq -2 C2*R2*.fastq -S C2paired.sam
</code></pre>

<p>And I get the error message:</p>

<pre><code>./HISAT2_Basic_14.sh: line 26: -p: command not found
</code></pre>

<p>When I remove the -p argument, the error message is similar, but says "--dta: command not found"</p>

<p>Any ideas on what the issue is?</p>

<p>Thank you!</p>

<phylogenetics><transcriptome><genomics>
Command not found error on HISAT2
# Command not found error on HISAT2

(Asked by: username_0 on 2018-03-12)

I have been attempting to map reads to a reference genome using HISAT2 using the Pertea, et al 2016 Nature Protocols paper. I am able to successfully generate an index (using the hisat2-build command), but when it comes to the actual mapping, I run into problems. The code I'm using (from the paper):
$hisat2 -p 8 --dta -x daphnia_tran -1 C2*R1*.fastq -2 C2*R2*.fastq -S C2paired.sam

And I get the error message:
./HISAT2_Basic_14.sh: line 26: -p: command not found

When I remove the -p argument, the error message is similar, but says "--dta: command not found"
Any ideas on what the issue is?
Thank you!

**Tags:** phylogenetics, transcriptome, genomics

---

## 1 answers

### Answer by username_1 on 2018-03-13. Score: 3 | Accepted answer

tldr: Remove the $ from the command.
I imagine you're literally typing $hisat2, where you mean to instead type hisat2. The $ is just meant to show the end of the command prompt. If you actually type $hisat2, you're not executing the hisat2 program, but whatever the $hisat2 variable is set to. Since it's likely not set to anything, it's just ignored. For example:
ryan@maximus:~$ $hisat2 ls
bin              convertChromosomesChain.py  ...

Since there's no $hisat2 variable, I'm actually just running ls. Likewise, your command is just reducing to -p 8 --dta -x daphnia_tran -1 C2*R1*.fastq -2 C2*R2*.fastq -S C2paired.sam, which is the source of the error.

> **Comments:**
> **username_0**: Can't believe I missed that, thanks very much! The script seems to be running perfectly now.  

---

