Entering edit mode
4.7 years ago
1713307477
•
0
My operation system is Ubuntu 18.04.4 LTS, conda (Miniconda3) version is 4.8.2, and hisat2 version is 2.20. I want to run an alignment using HISAT2, though it can run, but come out an IndexError. Can anyone tell me how to figure it out.
hisat2 -t -x ~/data/rna-seq/reference/index/hg19/genome -1 ~/data/rna-seq/fq/SRR3589956_1.fastq.gz -2 ~/data/rna-seq/fq/SRR3589956_2.fastq.gz -S ~/data/rna-seq/reference/aligned/SRR3589956.sam
Traceback (most recent call last):
File "/home/guangingmai/miniconda3/bin/hisat2_read_statistics.py", line 210, in <module> reads_stat(args.read_file, args.read_count)
File "/home/guangingmai/miniconda3/bin/hisat2_read_statistics.py", line 168, in reads_stat for id, seq in fstream:
File "/home/guangingmai/miniconda3/bin/hisat2_read_statistics.py", line 44, in parser_FQ if line[0] == '@':
IndexError: index out of range
Time loading forward index: 00:00:04
Time loading reference: 00:00:02
did you make the index or downloaded a pre-built one?
I have downloaded the index from HISAT2 website, and save it to
~/data/rna-seq/reference/index/hg19
.That sounds about right, so I assume
hg19
folder contains likegenome.1.ht2
etc?yes, the index file i downloaded has eight
genome.*.ht2
files.Did you download the indexes from here?
yes, i downloaded the indexes in this.
Are you running in command line or bash script? Now this shouldn't be a problem, but sometimes describing path with "~/" doesn't work for me. So I rather describe the path with "/home/user/....". Just do pwd in your index file folder and that will give you the path.
Unrelated: Also if you plan to use Stringtie afterward, you need to use --dta flag.
I run this in command line, and after it run out, I find a
.sam
file in the directory i specified.Then you are good to go as long as you have data in your SAM file.
I see that this is a python run problem and not the problem with index per say. "Index error: index out of ranger" in a python script happens if you are trying to call an element in the list that doesn't exist. May be it is not able to read the fastq files? Did you run fastqc on them?
Try running the command as I suggested with full path (just for sake of it!). Also you have to mention the strandness of your reads with --rna-strandness flag (which is unrelated to the error).
Do you have empty lines in your fastq files?
Hi,
Have you resolved the issue? I have the same error message but the alignment seems ok as well.
My anaconda version is
conda 4.7.12
and hisat2 version issame error, any updates
Try: HISAT2 alignment problem