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.
Wow!! Normal grep on a sample file took 17 sec, whereas
LC_ALL=C
just took only 4 sec. Wonderful! Thank you very much.For finding the fixed string using
LC_ALL=C fgrep
is very fast. But when it comes to finding regex, it is slower (although slightly faster than normal grep).fgrep doesn't work with regexes (that's why it's faster), could it be that it switches to egrep or grep -g for you?
Yes. You are true. It does not work for regex. I was only looking only at the time of execution. My mistake.