[Bioperl-l] T-Coffee and Simple Align Objects

James Wasmuth james.wasmuth@ed.ac.uk
Tue Jan 21 12:44:03 EST 2003

Dear All,

this is has been bugging me for days, and I hope someone can answer it 
or suggest a solution.

I'm writing a program that builds alignments iteratively using T-Coffee. 
 I've written a sub-routine to carry out the alignment building which is 
in a while loop, so basically...

while ($cond)    {
    $aln_obj = &TCoffee($some_seq);
    $cond = &somethingelse($aln_obj);


sub T_COFFEE    {
    my $fasta_seq = $_[0];
    my $out = "out";
#some code hear that converts $some_seq into array of BioSeq objects
    my @params = ('output' => 'gcg, score_html' , 'outfile' => "$out");
    my $factory = new Bio::Tools::Run::Alignment::TCoffee (@params);
    my $aln = $factory->align(\@seq_obj);
    return $aln;

The first time that T-Coffee is asked to build an alignment (from a 
reference of an array of BioSeq objects, it works fine and a SimpleAlign 
object is created by the &TCoffee subroutine.  However its the second 
time of asking that things go flat.

I've double checked (and then some) that the argument for the ->align() 
is correct and it is.  In fact I've inserted dummy code asking it to 
align a fasta file from elsewhere.  While the alignment IS created and 
stored in a FILE, the desired SimpleAlign object, $aln, is NOT created. 
 I've tried loads of things to try and see what's going on.  I can build 
as many SimpleAlign objects as I wish in the subroutine for the first 
iteration but not subsequently.  I've even created a near identical 
second subroutine  and placed this after the first and asked it to build 
an alignment of some else completely, but to no avail, the alignment is 
created in the required outfile, but not as a SimpleAlign object.  I've 
also placed the code for the &TCoffee in the while loop instead of the 
subroutine, and again the SimpleAlign object, $aln, is created only for 
the first iteration.

Anyone any suggestions?  Otherwise I'll have to make it a system call 
and I don't fancy re-writing the subsequent code...




Nematode Bioinformatics
Blaxter Nematode Genomics Group
Institute of Cell, Animal and Population Biology
Ashworth Labs
University of Edinburgh
King's Buildings

0131 650 7403

More information about the Bioperl-l mailing list