Could not locate a HISAT2 index to basename
2
1
Entering edit mode
6.8 years ago
oolongoni ▴ 10

First time trying out HISAT2 and I'm having a problem here, even with the pre-made indices for GRCH38.

$ hisat2 -x /share/projects/RNASeq/data/reference/GRCh38/grch38_tran -1 /home/echang/PANCANCER-030817-JE3-35880845/KTP-10-43736695/KTP-10_S3_L001_R1_001.fastq.gz -2 /home/echang/PANCANCER-030817-JE3-35880845/KTP-10-43736695/KTP-10_S3_L001_R2_001.fastq.gz -S tmp.sam

Error follows

Could not locate a HISAT2 index corresponding to basename "/share/projects/RNASeq/data/reference/GRCh38/grch38_tran"
Error: Encountered internal HISAT2 exception (#1)
Command: /home/echang/software/hisat2-2.1.0/hisat2-align-s --wrapper basic-0 -S tmp.sam -1 /tmp/31969.inpipe1 -2 /tmp/31969.inpipe2 /share/projects/RNASeq/data/reference/GRCh38/grch38_tran
(ERR): hisat2-align exited with value 1

The contents of the grch38_tran

$ ls /share/projects/RNASeq/data/reference/GRCh38/grch38_tran
genome_tran.1.ht2  genome_tran.3.ht2  genome_tran.5.ht2  genome_tran.7.ht2  make_grch38_tran.sh
genome_tran.2.ht2  genome_tran.4.ht2  genome_tran.6.ht2  genome_tran.8.ht2

I thought perhaps the genome_tran.*.ht2 needed to change to grch38_tran.*.ht2, but it still does not work after renaming. I've since untarred the original file again without change. Was there a step I missed? Where can I find HISTAT2_INDEXES?

-x <hisat2-idx>
The basename of the index for the reference genome. The basename is the name of any of the index files up to but not including the final .1.ht2 / etc. hisat2 looks for the specified index first in the current directory, then in the directory specified in the HISAT2_INDEXES environment variable.
RNA-Seq Hisat2 • 13k views
ADD COMMENT
0
Entering edit mode

"/share/projects/RNASeq/data/reference/GRCh38/grch38_tran " maybe has some problem. you could try to change the path into "~/share/projects/RNASeq/data/reference/GRCh38/grch38_tran". Totally, you should know its correct directory.

ADD REPLY
0
Entering edit mode

That's not the same. ~ is shorthand for your home directory, while /share is likely to exist on the root. Note that this question also already has an answer.

ADD REPLY
0
Entering edit mode

Hi i have the same problem i tried the path from here it dose not work for me. would like your kindly help pleas :)

pwd@DESKTOP-HDAGSMU:/mnt/c/Users/User/Desktop/genomics_and_bioinformatics/project$ hisat2-align-s -x /grch38_tran/genome_tran -U DE1a_subsample_trimmed.fastq.gz -S DE1a_subsample_mapped.sam

Could not locate a HISAT2 index corresponding to basename "/grch38_tran/genome_tran" Error: Encountered internal HISAT2 exception (#1) Command: hisat2-align-s -x /grch38_tran/genome_tran -U DE1a_subsample_trimmed.fastq.gz -S DE1a_subsample_mapped.sam

ADD REPLY
1
Entering edit mode

What does ls -lh /grch38_tran/genome_tran* show?

ADD REPLY
0
Entering edit mode

it is actually just grch38_tran

ls -lh /grch38_tran shows "No such file or directory".

but it is decently in there!

ADD REPLY
0
Entering edit mode

Hi and thanks, I tried using the whole phtw and it worked, this error is gone but the code still doesn't work now I just have one more error

I would appreciate further help please

The command now is

hisat2-align-s -x /mnt/c/Users/User/Desktop/genomics_and_bioinformatics/projectgrcm38_tran -U DE1a_subsample_trimmed.fastq.gz -S DE1a_subsample_mapped.sam

and i gate back

Error: Encountered internal HISAT2 exception (#1)

ADD REPLY
1
Entering edit mode

Did you make projectgrcm38_tran index yourself?

Run HISAT2 directly like so

hisat2 -x /mnt/c/Users/User/Desktop/genomics_and_bioinformatics/projectgrcm38_tran -1 DE1a_subsample_trimmed.fastq.gz -S DE1a_subsample_mapped.sam

You need to use -1 if you have a single data file. -U option is where you have multiple filenames listed in another file.

ADD REPLY
0
Entering edit mode

actually I already tried it without the U: hisat2-align-s -x grcm38_tran/genome_tran -1 DE1a_subsample_trimmed.fastq -S DE1a_subsample_mapped.sam and I think it worked (I got some kind of sam file, that's called DE1a_subsample_mapped.sam) but I'm not sure that there really was a proper mapping.

In this way as you mentioned: hisat2-align-s -x grcm38_tran/genome_tran -1 DE1a_subsample_trimmed.fastq -S DE1a_subsample_mapped.sam

Returns it: Error: 1 mate files/sequences were specified with -1, but 0 mate files/sequences were specified with -2. The same number of mate files/ sequences must be specified with -1 and -2. Error: Encountered internal HISAT2 exception (#1) Command: hisat2-align-s -x grcm38_tran/genome_tran -1 DE1a_subsample_trimmed.fastq -S DE1a_subsample_mapped.sam

ADD REPLY
3
Entering edit mode
6.8 years ago
EagleEye 7.5k

Your genome index path in hisat2 should be,

-x /share/projects/RNASeq/data/reference/GRCh38/grch38_tran/genome_tran
ADD COMMENT
0
Entering edit mode

Thank you sir! I guess it makes sense now. I wonder why renaming the *ht2 index files did not work.

ADD REPLY
0
Entering edit mode
6.8 years ago

Instead of renaming the index files, could you try changing the index prefix itself in the -x option like shown below?

$ hisat2 -x /share/projects/RNASeq/data/reference/GRCh38/genome_tran -1 /home/echang/PANCANCER-030817-JE3-35880845/KTP-10-43736695/KTP-10_S3_L001_R1_001.fastq.gz -2 /home/echang/PANCANCER-030817-JE3-35880845/KTP-10-43736695/KTP-10_S3_L001_R2_001.fastq.gz -S tmp.sam

Give a try and let us know the outcome.

ADD COMMENT
0
Entering edit mode

Thanks for your input! I can try changing the index directory name from /share/projects/RNASeq/data/reference/GRCh38/grch38_tran/ to /share/projects/RNASeq/data/reference/GRCh38/genome_tran after the job is finished running.

ADD REPLY
0
Entering edit mode

I have the same problem but adding the file prefix to the path is not solving it :/ . I still have the same problem, do you know why could it be? Here I leave you my code (RNA-seq mapping, single end mode, Mac OS X El Capitan, HiSat2): hisat2 -f --no-softclip -x /Users/dpz/Documents/Ref/hisat2index/hisat2indexhg38 -U path/to/data/reads.fastq.gz -S output.sam

ADD REPLY

Login before adding your answer.

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