[Bioperl-l] Bio::Tools::Run::Alignment::Clustalw. Alignment doesn't print out in CGI.

Tariq Shafi tariq_shafi75 at hotmail.com
Sat May 29 11:25:50 EDT 2004


Hello all

Got a major problem using BioPerl and can't figure out the solution!

I am trying to make an alignment in Clustalw and print out the results to a 
CGI page, with no luck.

When I print out to the console it prints out, but it doesn't work in the 
web page.

Here is the code:

# Filename: DoAlignment.pl

#!/usr/bin/perl

use CGI qw(:standard);
use Bio::Seq;
use Bio::SeqIO;
use Bio::Tools::Run::Alignment::Clustalw;

$query = new CGI;

print $query->header;

# The dbh connection works fine. (I have changed the names here for 
security)
$dbh = DBI->connect('dbi:mysql:dbname=db;host=host.domain.;port=9999', 'me', 
'my password') or die("connection not made:\n");


for ($i = 1; $i < 4; $i++)

{
     $seq = Bio::Seq->new(-seq => 'ATCGT',
                                     -desc => 'Sample sequence',
                                     -id => 'something' . $i,
                                     -accession_number => 'GB_ID'
                                     -moltype=>'dna');

     print $seq->seq(), br();
     print $seq->id(), br();
     push @sequences, $seq;
}

# Prints out '3' to web page, which is fine
print scalar @sequences, br();

@params = ('ktuple'=>2, 'matrix' => 'BLOSUM');
$aligner = Bio::Tools::Run::Alignment::Clustalw->new(@params);

# This prints out to web page
print "Here!", br();

$alignment = $aligner->align(\@sequences);

#This does NOT print out to web page
print "Here again!", br();

On the web page, this executable script types the following:

ATCGT
something1
ATCGT
something2
ATCGT
something3
3
Here!


But there is no ClustalW alignment printed out and not even the 'Here 
Again!' after the Clustalw operation. Everything works fine when I test 
./DoAlignment.pl on the console.

Many thanks for your help in advance

Tariq

_________________________________________________________________
Use MSN Messenger to send music and pics to your friends 
http://www.msn.co.uk/messenger



More information about the Bioperl-l mailing list