This is a test version of Biostars. For the public version, visit https://www.biostars.org.
ERROR: while running fastqc on a fastq file

I am getting error while running fastqc on one of the pair end fastq file:

/home/yog/software/FastQC/fastqc -t 8 -o /data/Analysis/data_new/qc/ /data/Analysis/data_new/AS_0_R2_001.fastq
Failed to process /data/Analysis/data_new/AS_0_R2.fastq

uk.ac.babraham.FastQC.Sequence.SequenceFormatException: ID line didn't start with '@'

I also tried repair.sh from bbmap:

   [root@psgl data_new]# /home/yog/software/bbmap/repair.sh in1=AS_0_R1.fastq in2=AS_0_R2_001.fastq out1=AS_0_R1.fastq out2=AS_0_R2.fastq outsingle=singletons.fastq

java -ea -Xmx204663m -cp /home/yog/software/bbmap/current/ jgi.SplitPairsAndSingles rp in1=AS_0_L003_R1.fastq 

in2=AS_0_CGATGT_L007_R2_001.fastq out1=AS_0_R1.fastq out2=AS_0_R2.fastq outsingle=singletons.fastq

Executing jgi.SplitPairsAndSingles [rp, in1=AS_0_R1.fastq, in2=AS_0_R2.fastq, out1=AS_0_R1.fastq, out2=AS_0_R2.fastq, outsingle=singletons.fastq]


Set INTERLEAVED to false

**Exception in thread "Thread-2" java.lang.AssertionError:**

Error in AS_0_R2.fastq, line 3, with these 4 lines:

HHFFFFFEEDEEEDDDDDDDDDDDDDDDBDDDDBCC>

@HWI-1KL175:31:D1Y8NACXX:7:1101:6792:2151 2:N:0:CGATGT

GTTTTAAAGAAGTGAGACTTGTGAGCAAGGAATCTAAACATGCCGGAGGAGACCCTCTTATATTATGCTTTGTTGATTTCTCGACCCCTAGCCATGCAGCC

+
rna-seq

2 answers

Looks like you have a messed up fastq file, you'll need to delete the first 3 or so lines.

How can I delete these?

awk '{if(NR>3) print}' input.fastq > output.fastq

That's assuming the error is the first 3 lines. While that's what the error message suggests, do have a look to check.

repair.sh is not going to help. It fixes messed up order of R1/R2 reads but not problems with actual reads, AFAIK. You have a malformed fastq record at that location that you would need to take care of (i.e. delete affected reads from both files or re-download non-corrupt version of the data).

You could use fastqValidator.

Log in to answer this question.