[Bioperl-l] alignment by TCoffee as a subroutine

Sendu Bala bix at sendu.me.uk
Wed Apr 30 08:47:17 EDT 2008

sergei ryazansky wrote:
> My subroutine is following:
> sub align {
>     my $file=shift @_;
>     my @params = ('ktuple' => 2,'matrix' => 'BLOSUM', 'output' => 
> 'fasta', 'outfile' => 'temp_align.out');
>     my $factory = Bio::Tools::Run::Alignment::TCoffee->new(@params);
>     my $aln=$factory->align ($file);
>     open (fy,'temp_align.out'); my @temp_file=<fy>; close fy;
>     return @temp_file;
> }
> This subroutine is called by the following command:
> my @align_fa = align($inputfile_align);
> After successful execution of this subroutine (accompaning with the 
> corresponding messages on the terminal window) the execution of 
> remainder script is terminated without any error messages.

The problem lies somewhere within the rest of your script, so we have to 
see it if you want help.

Why are you using Bio::Tools::Run::Alignment::TCoffee at all if you 
don't make use of the resulting alignment object? A system call might 
make more sense given what you're doing. The beauty of 
Bio::Tools::Run::Alignment::TCoffee is that you don't have to parse the 
result file (temp_align.out) yourself.

More information about the Bioperl-l mailing list