use Bio::SeqIO;
#convert .fastq.gz to .fasta
open my $zcat, 'zcat seq.fastq.gz |' or die $!;
my $in=Bio::SeqIO->new(-fh=>$zcat,
-format=>'fastq');
my $out=Bio::SeqIO->new(-file=>'>seq.fasta',
-format=>'fasta');
while (my $seq=$in->next_seq) {
$out->write_seq($seq)
}