-1
$\begingroup$

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!

$\endgroup$
3
$\begingroup$

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.

$\endgroup$
1
  • $\begingroup$ Can't believe I missed that, thanks very much! The script seems to be running perfectly now. $\endgroup$
    – genome454
    Mar 13 '18 at 16:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.