[Bioperl-l] ace to msf format?

Jason Stajich jason at cgt.duhs.duke.edu
Sun Aug 31 22:28:43 EDT 2003


Each Contig is a Bio::Align::AlignI - so in theory you can manipulate
them as if they are Bio::SimpleAlign objects.  Robson can clarify if there
are any caveats there.


But you want to do this to have access to each contig in the scaffold:
foreach my $contig ( $scaffold->all_contigs ) {
 # process Bio::Assembly::Contig object here
}

Your code below is calling it in scalar context which will just have $aln
being set to the length of the returned array.

-jason

On Mon, 1 Sep 2003, Wes Barris wrote:

> Brian Osborne wrote:
>
> > Wes,
> >
> > I don't think this is possible in Bioperl. To put it more generally, AlignIO
> > can't accommodate Assembly objects currently. AlignIO is the module that
> > takes in a variety of alignment formats and interconverts them, analogous to
> > SeqIO. I'll be corrected if I'm wrong.
> >
> > Brian O.
>
> I am kind of new to this so I could be wrong but isn't an Assembly a group
> of alignments?  So, from one assemble, a group of alignments could be
> generated?
>
> >
> > -----Original Message-----
> > From: bioperl-l-bounces at portal.open-bio.org
> > [mailto:bioperl-l-bounces at portal.open-bio.org]On Behalf Of Wes Barris
> > Sent: Thursday, August 28, 2003 7:58 PM
> > To: Bioperl Mailing List
> > Subject: [Bioperl-l] ace to msf format?
> >
> > Can anyone give me a hint as to how I could use bioperl to read in
> > an ACE assembly and write out an MSF formatted alignment?  This shows
> > what I have figured out so far:
> >
> > #!/usr/local/bin/perl -w
> > #
> > use strict;
> > use Bio::Assembly::IO;
> > #
> > my $usage = "Usage: $0 <infile.ace>\n";
> > my $infile = shift or die $usage;
> >
> > my $io = new Bio::Assembly::IO(-file=>$infile, -format=>'ace');
> > my $assembly = $io->next_assembly;
> >
> > my $aln = $assembly->all_contigs();
> >
> > --
> > Wes Barris
> > E-Mail: Wes.Barris at csiro.au
> >
> >
> > _______________________________________________
> > Bioperl-l mailing list
> > Bioperl-l at portal.open-bio.org
> > http://portal.open-bio.org/mailman/listinfo/bioperl-l
> >
>
>
>

--
Jason Stajich
Duke University
jason at cgt.mc.duke.edu


More information about the Bioperl-l mailing list