hisat2
1
0
Entering edit mode
3.5 years ago

I'm trying to run hisat2 on a fastq file following the given syntax but it is giving me errors:

$ hisat2 -x S_lycopersicum_chromosomes.3.00_ch04.fa  -U SRR404331_ch4.fastq -S test.sam

Error:

Could not locate a HISAT2 index corresponding to basename "S_lycopersicum_chromosomes.3.00_ch04.fa"
Error: Encountered internal HISAT2 exception (#1)
Command: /usr/local/bin/hisat2-align-s --wrapper basic-0 -x S_lycopersicum_chromosomes.3.00_ch04.fasta -S test.sam -U SRR404331_ch4.fastq 
(ERR): hisat2-align exited with value 1

Even tho the files are present in the same directory I'm running the terminal from. I am a newbie so please explain what is wrong here.

Also upon running other .fastq files from the same directory some of them gives me errors of "could not open read file "file.fastq" for reading : skipping. Does it has something to do with my fastq files?

NGS hisat2 • 2.1k views
ADD COMMENT
0
Entering edit mode

Command is incorrect. In stead of supplying the directory name you are furnishing reference fa. First build index for the said chromosome, in a directory as indexing creates multiple files. Furnish the directory with indices for -x option.

ADD REPLY
0
Entering edit mode

you mean $ hisat2 -x 'index_files' .....?

ADD REPLY
1
Entering edit mode
$ hisat2-build  -p 4 S_lycopersicum_chromosomes.3.00_ch04.fa sly_chr4_index
$ hisat2-inspect  sly_chr4_index
$ $ hisat2 -x  sly_chr4_index -U SRR404331_ch4.fastq -S test.sam

change -p as per CPUs (and corresponding threads) on your machine.

ADD REPLY
0
Entering edit mode

Thank you for your help. Actually I am a studying BS-Biotechnology but Bioinformatics had my attention so I'm trying to learn some BI on my own. Self-learning is quite difficult tbh.

ADD REPLY
0
Entering edit mode

I have another question if you don't mind asking. How can I further utilize .sam file ? such as how many reads are there in test.sam file? Also the multiple file that was created using hisat2-build, are these separate chromosomes present in the input.fa file?

ADD REPLY
1
Entering edit mode
How can I further utilize .sam file ? 

Depends on the end goal of your analysis.

such as how many reads are there in test.sam file?

Read samtools manual. Functions like idxstats, flagstat, index , quickcheck view depth will help understanding about your alignment (file)

Also the multiple file that was created using hisat2-build, are these separate chromosomes present in the input.fa file?

No. Hisat2 generates multiple indices (index files) using reference sequence (fasta file) to be used in alignment. The multiple files what you see are indices of reference file (in this case chromosome 4 fasta fie).

ADD REPLY
0
Entering edit mode

hisat2-build reference.fa (index-name)

ADD REPLY
1
Entering edit mode
3.5 years ago
Dragod ▴ 10

Have u build the index file for the reference first?

ADD COMMENT
0
Entering edit mode

Well, I was provided with a shell script and an 'index_files.zip' after running the shell script i got this file: 'S_lycopersicum_chromosomes.3.00_ch04.fa'. along with other files. but It was mentioned in the notes to use 'S_lycopersicum_chromosomes.3.00_ch04.fa' as a reference file.

ADD REPLY

Login before adding your answer.

Traffic: 1235 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