[Bioperl-l] question on simple align object

Brian Osborne brian_osborne at cognia.com
Fri Feb 6 17:00:08 EST 2004


Michael,

I just wrote this on the command-line, it is sloppy but it seems to work:

~/programming/perl/Bioperl>perl -e 'use Bio::AlignIO; $io =
Bio::AlignIO->new(-file => "aln.clustalw", -format => "clustalw" ); my $aln
= $io->next_aln;
use IO::String; $out = IO::String->new(\$str); $ioout =
Bio::AlignIO->new(-format=> "msf", -fh => $out ); $ioout->write_aln($aln);
print $str;'

I've created my SimpleAlign object from a file, you won't need to do that,
of course.

Brian O.

-----Original Message-----
From: bioperl-l-bounces at portal.open-bio.org
[mailto:bioperl-l-bounces at portal.open-bio.org]On Behalf Of Michael Cipriano
Sent: Friday, February 06, 2004 4:44 PM
To: bioperl-l at bioperl.org
Subject: [Bioperl-l] question on simple align object

Is there a way I can get a Simple Alignment object that I created from a
clustalw alignment into a string of a specific format? I do not want to
deal with any files at all, I want to just be able to print the
alignment from a cgi-script on a web page.

So far I have this:

# Create alignment
my @params = ('ktuple' => 2, 'matrix' => 'BLOSUM');
my $factory = Bio::Tools::Run::Alignment::Clustalw->new(@params);

my $aln = $factory->align($seq_array_ref);

I tried all sorts of things, but can't get specifically what I need
(which is simply the whole alignment file as a msf formated string). I
would like to not have to deal with any temporary files, unless there is
a way I can get to the temporary file that is created from the clustalw
alignment and just stick that into a string.

Thanks for any help in advance.



_______________________________________________
Bioperl-l mailing list
Bioperl-l at portal.open-bio.org
http://portal.open-bio.org/mailman/listinfo/bioperl-l




More information about the Bioperl-l mailing list