Convert fastq to fasta using zcat

This code will convert a fastq format file into a fasta format file:

zcat < filename.fastq.gz | awk 'NR%4==1{printf ">%s\n", substr($0,2)}NR%4==2{print}' > output_file.fa

Leave a Reply

Your email address will not be published. Required fields are marked *