Nice. Isn't -G redundant, because it's default?
• 0 views
•
link
Dear all,
I have some questions about manipulating fastq files. Its the first time I do this, so I want advice, how to do it. Its a special case, because I only want to keep reads when the following criteria prevail:
The read must contains at least 8 T'-s at both end.
example of wanted reads:
TTTTTTTT+NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN+TTTTTTTT
Is there a way to collect these reads?
Regards, Laszlo
zgrep -B 1 -A 2 -G "^TTTTTTTT.*TTTTTTTT$" sample.fastq.gz | grep -v "^--$" | gzip > sample.lots_of_Ts.fastq.gz
Or just use grep and skip the gzip at the end if you're not working with gzipped files.
Log in to answer this question.