[Bioperl-l] Convert fastq to fasta

0 views
Skip to first unread message

perlbio007

unread,
Apr 27, 2011, 8:26:49 PM4/27/11
to Biop...@lists.open-bio.org

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?

--
View this message in context: http://old.nabble.com/Convert-fastq-to-fasta-tp31492543p31492543.html
Sent from the Perl - Bioperl-L mailing list archive at Nabble.com.

_______________________________________________
Bioperl-l mailing list
Biop...@lists.open-bio.org
http://lists.open-bio.org/mailman/listinfo/bioperl-l

Cook, Malcolm

unread,
Apr 29, 2011, 1:11:16 PM4/29/11
to perlbio007, Biop...@lists.open-bio.org
I don't think you want bioperl for this

try fastq_to_fasta part of http://hannonlab.cshl.edu/fastx_toolkit/

usage: fastq_to_fasta [-h] [-r] [-n] [-v] [-z] [-i INFILE] [-o OUTFILE]


Malcolm Cook
Stowers Institute for Medical Research - Bioinformatics
Kansas City, Missouri USA

Tao Zhu

unread,
Apr 30, 2011, 2:56:54 AM4/30/11
to perlb...@gmail.com, BioPerl List
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 <perlb...@gmail.com>


> Subject: [Bioperl-l] Convert fastq to fasta

> To: Biop...@lists.open-bio.org
> Message-ID: <314925...@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: tz...@mail.bnu.edu.cn
Website: http://bnuzt.org (mainly written in Chinese)

Florent Angly

unread,
May 1, 2011, 10:17:56 PM5/1/11
to perlbio007, Biop...@lists.open-bio.org
You need to use this module: Bio::SeqIO::fastq
Read this for explanations:
http://doc.bioperl.org/releases/bioperl-current/bioperl-live/Bio/SeqIO/fastq.html
Regards,
Florent

On 28/04/11 10:26, perlbio007 wrote:
> 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?

_______________________________________________

Reply all
Reply to author
Forward
0 new messages