fastp icon indicating copy to clipboard operation
fastp copied to clipboard

FastQ contains reads header name only - ERROR: sequence and quality have different length

Open phucty opened this issue 2 years ago • 2 comments

I got the error when running fastp on sample.fastq.gz: ERROR: sequence and quality have different length Could you help me resolve the issue? Thank you.

My command:

fastp --in1 "${READS[0]}" \
       --in2 "${READS[1]}" \
       --out1 "${sample_id}_R1_paired.fastq.gz" \
       --out2 "${sample_id}_R2_paired.fastq.gz" \
       --json ${sample_id}_report.fastp.json \
       --html ${sample_id}_report.fastp.html \
       --cut_front 3 \
       --cut_tail 3 \
       --cut_right_window_size 4 \
       --cut_right_mean_quality 15 \
       --length_required 36 \
       --length_limit 75 \
       --thread 16 \
       --dedup \
       --detect_adapter_for_pe \
       --adapter_fasta resources/TruSeq3-PE-2.fa \
       2> ${sample_id}_report.fastp.log

FastQ header only reads: $ zcat sample.fastq.gz | grep -a5 "@VH00294:10:AAAWTLCHV:2:2510:16243:13628 1:N:0:ATTGCGTG+GTTATGGC"

CCCC;CCCCCC-;CCCCCCCCCCC-C;-CCC-CCCCCCCCCCCCCCC;CCC
@VH00294:10:AAAWTLCHV:2:2510:10108:13628 1:N:0:ATTGTGTG+GTTATGGC
CACGGGCTTTTGGCCGTAGTGGTGGGGTTATTTCTCAGCTCATGGTCAAA
+
CCCCCCCCCCC;CCCCCCCCC-CCCCCCCCCCCCCCCCCCC-CC-CCCCC
@VH00294:10:AAAWTLCHV:2:2510:16243:13628 1:N:0:ATTGCGTG+GTTATGGC

+

@VH00294:10:AAAWTLCHV:2:2510:65513:13628 1:N:0:ATTGCGTG+GTTATGGC
ATCCAAAACTTTCAAATAAGGCAAAAATACTGGTACATCTTTAAAATATCT

phucty avatar Aug 17 '23 03:08 phucty

Hey, I had this problem with one of the older versions, there was an open issue for it before it was fixed in the latest build (I'll search and link to the respective issue later), did you use the newest version of fastp (0.23.4)? That definitively solved that problem for me (now I'm running into a different one...).

Caffenicotiak avatar Aug 24 '23 23:08 Caffenicotiak

I had this problem,too. I think my files may have been corrupted during the transfer,because the file is large and md5 is different. I change another correct file. The problem is solved.

gdmdxl avatar Dec 08 '23 03:12 gdmdxl