Mismatched reads

Hi,

Im using kneaddata on paired reads and I get the following error.

bowtie2: Error, fewer reads in file specified with -1 than in file specified with -2.

My script is:
#running kneaddata on PE reads

for i in R1_001.fastq.gz
do
filename=$(basename “$i”)
fname="${filename%_R
_001.fastq.gz}"

kneaddata --decontaminate-pairs lenient --input1 ${fname}_R1_001.fastq.gz --input2 ${fname}_R2_001.fastq.gz --output kneaddata_out --reference-db /home/gomeza/huma0011/shotgun_pr/Sus_scrofa/Ensembl/Sscrofa11.1/Sequence/Bowtie2Index --remove-intermediate-output -t 5 -p 2 --trimmomatic-options “SLIDINGWINDOW:4:20 MINLEN:90”

Any idea what is going on?

Hi,
Can you double check that the files you are inputting are correct? Try explicitly putting the file names in the kneaddata command instead of using bash?
From the kneaddata end, I don’t see anything obviously wrong. Can you try removing the “–decontaminate-pairs lenient” option? We don’t recommend it, and it’s mainly there as legacy code.

Thanks,
Tom