<p>Dear All,
Am I right to use the following script to transform a fastq file (named test.fastq) to a fasta file? THANKS a lot!</p>

<pre><code>#!/usr/bin/perl
use strict;
use Bio::SeqIO;
my $in=Bio::SeqIO-&gt;new(-file=&gt;"test.fastq",-format=&gt;'fastq');
my $out=Bio::SeqIO-&gt;new(-file=&gt;"&gt;test.fasta",-format=&gt;'fasta');
while(my $seq=$in-&gt;next_seq()){
      $out-&gt;write_seq($seq);
}
</code></pre>

If you want to convert fastq to fasta try:

    cat test.fastq | paste - - - - | sed 's/^@/>/g'| cut -f1-2 | tr '\t' '\n'