hadasvolk / CompLabNGS

Computational Lab in Next Generation Sequencing and Genomics Data Analysis - TAU 0411358701
MIT License
1 stars 1 forks source link

kallisto error: Illegal instruction #15

Closed hoeferjanka closed 4 months ago

hoeferjanka commented 4 months ago

Hi,

I have an issue running kallisto quant. The command i am running to index files is as follows:

$ kallisto quant -i index.idx -o kallisto_output_SRR24163115 -t 12 SRR24163115_1P.fastq SRR24163115_2P.fastq

[quant] fragment length distribution will be estimated from the data Illegal instruction

I keep receiving the "Illegal instruction" message. From researching on this issue i found that i have to check out the following things, which could cause the problem: I made sure that my input files are intact fastq files. I made sure that I have enough RAM and the needed CPU compatibility. I made sure that the kallisto version i am using (0.50.1) is the version the index.idx was created with. I tried updating conda and after updating it restarting the computer. The issue is still there. I tried deinstalling and reinstalling both kallisto and the index files.

After all this did resolve the error, i tried to creat an index myslef by downloading the files from the kallisto GitHub site: Mus_musculus.GRCm39.108.gtf.gz and Mus_musculus.GRCm39.dna.primary_assembly.fa.gz

I created a fasta file from these two with this command: $ gffread Mus_musculus.GRCm39.108.gtf -g Mus_musculus.GRCm39.dna.primary_assembly.fa -w transcripts.fa

When trying to create the index with kallisto, i got the same error as earlier:

$ kallisto index -i mouse_index.idx transcripts.fa

Illegal instruction

My next step is to ask for advice here. I am not sure which other options i have to try out.

Thanks!

Janka

hadasvolk commented 4 months ago

Hi Janka, great work attempting to debug

Please see issue #420 for a possible solution

Illegal instruction is probably caused by the kallisto binary not being compitable with your cpu. Running previous version of kallisto solves the issue for most users

hoeferjanka commented 4 months ago

Hi Hadas,

Thanks for the help! Using a different version solved the issue for me.

Using kallisto version 0.46 worked for me in the end. I am leaving my solution steps here, in case someone else needs it!

Because there is no index.idx available for download for this kallisto version (index and version must be compatible), I had to create one. Here is the code I used:

Download files

wget ftp://ftp.ensembl.org/pub/release-108/fasta/mus_musculus/dna/Mus_musculus.GRCm39.dna.primary_assembly.fa.gz wget ftp://ftp.ensembl.org/pub/release-108/gtf/mus_musculus/Mus_musculus.GRCm39.108.gtf.gz

Decompress files

gunzip Mus_musculus.GRCm39.dna.primary_assembly.fa.gz gunzip Mus_musculus.GRCm39.108.gtf.gz

Install gffread if not already installed

conda install -c bioconda gffread

Extract transcript sequences

gffread Mus_musculus.GRCm39.108.gtf -g Mus_musculus.GRCm39.dna.primary_assembly.fa -w transcripts.fa

Build the Kallisto index

kallisto index -i mouse_index.idx transcripts.fa

with this mouse_index.idx I can now run the kallisto quant commands and i get the abundance.tsv files.