Salmon error message
1
0
Entering edit mode
6.1 years ago

I am trying to quantify the expression of my genes by using salmon. The command is following

salmon quant -p 10 -i ensembl_index/ -l A -1 SRR1056045_2.fastq.gz -2 SRR1056045_1.fastq.gz -o ensembl_quant

But got the following error message:

Error reading from the FASTA/Q stream. Minimum return code for left and right read was (-2). Make sure the file is valid.

I was trying to analyse 5 .sra files which were downloaded from ncbi. Two of my files were OK, but enter-count problems with rest three. Same error message for them. Is it the problem with those .sra files?

Thanks

rna-seq salmon • 4.3k views
ADD COMMENT
1
Entering edit mode

If you are worried about sra files, you can directly download your fastq.gz files here:

https://www.ebi.ac.uk/ena/data/view/SRR1056045

ADD REPLY
0
Entering edit mode

Dear Biostars Community

salmon throws me the exact same error message "Error reading from the FASTA/Q stream. Minimum return code for left and right read was (-2)". However I have my own files, and I get this error only for one file out of 20.

This is the code I use:

#!/bin/bash
io="/storageNGS/ngs3/projects/other/Example"
output="salmon_outputs"
mkdir -p $output

nr_threads=42
[ -z "$2" ] || nr_threads=$2

for i in `ls -1 $io/mergedFASTQ/$1*.fastq | sort | awk '{if (NR%2==1) print $0}'`
do
  j=`echo $i | sed s/read1concat/read2concat/`
  sample_name=`basename $i "-read1concat.fastq"`
  salmon quant -i mm9_rna_salmon_index -l A -1 $i -2 $j -p $nr_threads --validateMappings -o $output/$sample_name
done

All my files are named *-read1concat.fastq and *-read2concat.fastq. For 19 it's fine, for one is not. What could be wrong with my file? I already used this file before, and had no problems. Thank you for any hint!

ADD REPLY
0
Entering edit mode

Plese do not ask questions in old threads. Open a new one. Go manually through your code for one representative iteration and see if $i and $j give the necessary output. Probably something is flawed parsing the two files in your script.

ADD REPLY
0
Entering edit mode

Salmon's parser uses kseq under the hood, and it simply propagates the kseq error code if it encounters one. This one seems to suggest that one of the files had a truncated quality string (i.e. the quality string was shorter than the corresponding read).

ADD REPLY
0
Entering edit mode
6.1 years ago

A couple things:

  1. One of those files (likely SRR1056045_1.fastq.gz) is corrupt. Just download it again.
  2. You flipped which file goes where. The _1 file should be with -1 and the _2 file should be with -2. Granted, salmon may figure out you've swapped things since you specified -l A, but there's no need to chance that.
ADD COMMENT

Login before adding your answer.

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