Biotechnology Forums
Change Header of fastq files | awk one liner - Printable Version

+- Biotechnology Forums (https://www.biotechnologyforums.com)
+-- Forum: Biotechnology Discussion (https://www.biotechnologyforums.com/forum-1.html)
+--- Forum: Bioinformatics (https://www.biotechnologyforums.com/forum-5.html)
+--- Thread: Change Header of fastq files | awk one liner (/thread-8140.html)



Change Header of fastq files | awk one liner - SunilNagpal - 09-08-2017

Use the following awk for changing the header of the fastq files:

awk '{print (NR%4 == 1) ? "@1_" ++i : $0}' filename.fastq

Here the bold 1 can be changed to whatever string you wish to use.