Fastq Sort By Sequence
2
0
Entering edit mode
10.1 years ago
hlsz.laszlo ▴ 50

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

fastq sort filter paired-end • 2.3k views
ADD COMMENT
3
Entering edit mode
10.1 years ago
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.

ADD COMMENT
0
Entering edit mode

Nice. Isn't -G redundant, because it's default?

ADD REPLY
0
Entering edit mode

True, it is redundant.

ADD REPLY

Login before adding your answer.

Traffic: 2704 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6