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?
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.
you mean $ hisat2 -x 'index_files' .....?
change
-p
as per CPUs (and corresponding threads) on your machine.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.
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?
Depends on the end goal of your analysis.
Read samtools manual. Functions like
idxstats
,flagstat
,index
,quickcheck
view
depth
will help understanding about your alignment (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).
hisat2-build reference.fa (index-name)