<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>

This is the fastest bash one-liner to convert fastq to fasta, assuming 4 lines per FASTQ record,  more on <a href='https://github.com/stephenturner/oneliners'>https://github.com/stephenturner/oneliners</a>

    sed -n '1~4s/^@/>/p;2~4p' test.fastq > test.fasta