This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Can Anyone Help Me In Finding The Script That Convert .Fastq To .Fasta Format

can anyone help me in finding the script that convert .fastq to .fasta format it would be help full if the script would be in perl scrpt or awk

conversion fastq fasta perl awk

4 answers

How about this?

awk 'BEGIN {id=1; seq=2;} NR==id{ sub(/^@/,">",$0); print $0; id += 4;} NR==seq{ print $0; seq += 4}' FASTQ_FILE

check this out : http://stackoverflow.com/questions/1542306/converting-fastq-to-fasta-with-sed-awk

Just did this with fastq_to_fasta from the fastx package (http://hannonlab.cshl.edu/fastx_toolkit/)

awk '/^@/{header=$0;getline;sequence=$0;gsub("@",">",header);printf "%sn%sn,header,sequence}' FAST-FILE

Log in to answer this question.