Dear all,
I would like to know if it is possible to extract/retain sequences from multiple fastq files based on a certan input sequences, and get new fastq files containing only sequences sharing the input sequence I provided.
I have found this command line that does the job, but it does that for a single fastq file, while I would like to have a command line that does such function for all the fastq file I have in the folder.
zcat Root-R01_AGA_L001_R2_001.fastq.gz \
| paste - - - - \
| awk -v FS="\t" -v OFS="\n" '$2 ~ "TGGACTAC" {print $1, $2, $3, $4}' \
| gzip > Root-R01_AGA_L001_R2_001.filtered.fq.gz
Can someone help me in this?
Many thanks in advance