This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Hisat2 index and alignment question

I indexed my reference genome using hisat2-build (mus musculus) and got 8 index files. However when I tried to start my alignment in the directory of my fastq files using this command

hisat2 -p 8 -x /path/to/musculus_index -1 SRR8348941_1_P.fastq.gz -2 SRR8348941_2_P.fastq.gz -S SRR8348941.sam --dta-cufflinks 2>&1 |tee SRR8348941.summary

it won't run but when I run the command in the directory my index files are located

hisat2 -p 8 -x musculus_index -1 /path/to/SRR8348941_1_P.fastq.gz -2 /path/to/SRR8348941_2_P.fastq.gz -S SRR8348941.sam --dta-cufflinks 2>&1 |tee SRR8348941.summary

it will generate the output files. Is there a reason why the first method (running the alignment command in the fastq file directory) does not work? How can I run the alignment command in the fastq file directory rather than in the index directory to generate output files?

ubuntu rna-seq index hisat2

Is it not an option just to add the path to write sam and summary files on fastq files directory (or anywhere you want)?

hisat2 -p 8 -x musculus_index -1 /path/to/SRR8348941_1_P.fastq.gz -2 /path/to/SRR8348941_2_P.fastq.gz -S **/path/to/**SRR8348941.sam --dta-cufflinks 2>&1 |tee **/path/to/**SRR8348941.summary

That worked! Thank you. Didn't know that was an option... now I know.

the most logical and simple explanation is that most likely the path to index is specified incorrectly

show us the paths with say ls then the way you invoke the command and the error it shows

Pathway of my reference genome reference index pathway

when I tried running this command

hisat2 -p 8 -x /path/to/musculus_index -1 SRR8348941_1_P.fastq.gz -2 SRR8348941_2_P.fastq.gz -S SRR8348941.sam --dta-cufflinks 2>&1 |tee SRR8348941.summary

in the directory where my fastq files are located, I got the error message (pic below) that it doesn't exist

Error message

I thought this was like bowtie2 where you need to specify the base file prefix as well. So, if your directory looks like:

/path/to/musculus_index/musculus_index.1.ht2
/path/to/musculus_index/musculus_index.2.ht2
/path/to/musculus_index/musculus_index.3.ht2
...

Then you would specify

/path/to/musculus_index/musculus_index

yes correct you have to pass the full prefix and not the directory

0 answers

No answers yet.

Log in to answer this question.