[Bioperl-l] Convert fastq to fasta

Tao Zhu tzhu at mail.bnu.edu.cn
Sat Apr 30 06:56:54 UTC 2011


Scripts like this are ok:

-------------  transform.pl  ---------------
use Bio::SeqIO;
my ($file1,$file2)=@ARGV;
my $seqin = Bio::SeqIO -> new (-format => 'fastq',-file => $file1);
my $seqout = Bio::SeqIO -> new (-format => 'fasta',-file => ">$file2");

while (my $seq_obj = $seqin -> next_seq)
{
   $seqout -> write_seq($seq_obj);
}
-------------------------------------------
run as this:
perl transfrom.pl sequence.fastq sequence.fasta

> Message: 7
> Date: Wed, 27 Apr 2011 17:26:49 -0700 (PDT)
> From: perlbio007 <perlbio123 at gmail.com>
> Subject: [Bioperl-l]  Convert fastq to fasta
> To: Bioperl-l at lists.open-bio.org
> Message-ID: <31492543.post at talk.nabble.com>
> Content-Type: text/plain; charset=us-ascii
> 
> 
> Iam new to Bioperl. Pls help.
> I have a zip folder of sequences which is in fastq format. I need to
> convert
> it in fasta format?
> How I do that using bioperl?What module do I need?
> 


-- 
Tao Zhu, College of Life Sciences, Beijing Normal University, Beijing
100875, China
Email: tzhu at mail.bnu.edu.cn
Website: http://bnuzt.org (mainly written in Chinese)





More information about the Bioperl-l mailing list