Hi all,

Could I please know if there is quickest way to extract reads from a huge fastq file to another. I already tried the following.

    grep -A3 '1:N:0:' ORGAN1.fastq >ORGAN1.cleaned.fastq

but grep takes too long. Any oneliners from you are very much appreciated.

Thank you

Prakki Rama.
A faster way is to do this:

    LC_ALL=C fgrep -A3 '1:N:0:' ORGAN1.fastq >ORGAN1.cleaned.fastq

<a href="http://www.inmotionhosting.com/support/website/ssh/speed-up-grep-searches-with-lc-all">Here</a> is an explanation of why this is so much faster.