I have paired end reads and want to extract only those which have this sequence within them:
I tried using
grep -B1 -A2 "TGTATGTAAACTTCCGACTTCAACTGTA" file_1.fq | grep -v "^--$"
and the same from the mate pair. After this I tried aligning them , but they dont align because the reads headers are different.
Can someone help in extracting the mate pair of one read from the other file (2.fq), so that they can be aligned ?