[Bioperl-l] Re: How to convert ABI trace file to Phred file?

Aaron J Mackey Aaron J. Mackey" <amackey@virginia.edu
Mon, 6 Jan 2003 16:36:28 -0500 (EST)


For now I'd suggest removing the while() loop.

Can ABI files have more than one sequence in them?

-Aaron

On Mon, 6 Jan 2003, Hong Xu wrote:

> Hi Aaron,
>
> It works! Thank you so much for your prompt response and help.
>
> I think the problem with abi.pm called from SeqIO.pm is that
> SeqIO.next_seq()
> returns a seq object although abi.next_seq() specifies to return a
> Bio::SeqWithQuality object. Their return object types don't match!
>
> Another problem is that SeqIO keeps writing the same sequnce again and
> again. It could convert 175kb ABI trace file into 35M phred file (NOT
> finish......)! And the actual phred file should be only 6kb!
>
> I used the cvs version of bioperl-live and bioperl-ext. I will try to
> install the
> bioperl 1.2 stable release.
>
> Thanks again for your help!
>
> best regards,
> Hong Xu      +1 919 684 3962
> hong.xu@duke.edu  wwwchg.duhs.duke.edu
>
>
> ----- Original Message -----
> From: "Aaron J Mackey" <ajm6q@virginia.edu>
> To: "Hong Xu" <hxu@chg.duhs.duke.edu>
> Cc: <bioinformatics@dieselwurks.com>; "Frank Zhao"
> <fzhao@chg.duhs.duke.edu>; "Bioperl" <bioperl-l@bioperl.org>
> Sent: Monday, January 06, 2003 2:41 PM
> Subject: Re: How to convert ABI trace file to Phred file?
>
>
> >
> > Does adding this help?
> >
> > use Bio::Seq::SeqFactory;
> > $ABIin->sequence_factory(
> >   new Bio::Seq::SeqFactory(-verbose => $ABIin->verbose,
> >                            -type => 'Bio::Seq::SeqWithQuality'
> >   )
> > );
> >
> > (After the $ABIin = new Bio::SeqIO ... bit)
> >
> > I'm not sure why abi.pm in the bioperl distribution doesn't set it's
> > sequence factory to SeqWithQuality ... but perhaps the Staden read package
> > didn't support reading abi trace quality??  If the above doesn't help you,
> > then I'll dig deeper.
> >
> > -Aaron
> >
> > On Mon, 6 Jan 2003, Hong Xu wrote:
> >
> > > Hi Chad, Aaron,
> > >
> > > I have installed bioperl-ext & bioperl-live with Staden io_lib.
> > > I want to convert ABI trace file to Phred file. I used SeqIO
> > > module to do it. Here is the code:
> > >
> > > #!/usr/local/bin/perl -w
> > > use strict;
> > > use Bio::SeqIO;
> > > use Getopt::Std;
> > >
> > > my %args;
> > > getopt("ap", \%args);
> > > if (!$args{a}) {
> > >   die "Please specify the input ABI file name!";
> > > }
> > > if (!$args{p}) {
> > >   die "Please specify the output PHD file name!";
> > > }
> > >
> > > my $ABIin = new Bio::SeqIO( -format => "ABI", -file => "$args{a}" );
> > > my $PHDout = new Bio::SeqIO( -format => "phd", -file => ">$args{p}" );
> > >
> > > while (my $seq = $ABIin->next_seq) {
> > >     $PHDout->write_seq($seq);
> > > }
> > >
> > > When I executed above code. The program asked for SeqWithQuality object.
> > > I don't know how to define that object? I couldn't find related
> document.
> > > Could
> > > you help me fix the problem?
> > >
> > > thanks,
> > > Hong Xu      +1 919 684 3962
> > > hong.xu@duke.edu  wwwchg.duhs.duke.edu
> > >
> > >
> >
> > --
> >  Aaron J Mackey
> >  Pearson Laboratory
> >  University of Virginia
> >  (434) 924-2821
> >  amackey@virginia.edu
> >
> >
> >
>

-- 
 Aaron J Mackey
 Pearson Laboratory
 University of Virginia
 (434) 924-2821
 amackey@virginia.edu