[Bioperl-l] alignment by TCoffee as a subroutine

sergei ryazansky dr.hogart at gmail.com
Wed Apr 30 10:54:59 EDT 2008


Hi Albert,

The isolated call is executed without any problem, so the code is  
absolutely correct. The problem arise when this sub executed within the  
whole script - after successful execution of TCoffee alignment the  
execution of the rest of script is terminated. The whole code is very big  
(~500 lines), so for simplicity lets imagine the sheme of script in the  
following view:
sub1;
sub2;
sub3;
sub align;  # TCoffe alignment;
sub4;
sub5;

Each sub (subroutine) is independent from the others subs; The order of  
script execution is 1,2,3,align,4,5. But after the execution of align the  
execution of the rest of subs (4 and 5) is terminated. The script without  
sub align {} successfully execute the sub 4 and sub 5. So, I mean that  
interpreter won't compile sub 4 and 5 if sub align is placed before them.

On Wed, 30 Apr 2008 18:16:56 +0400, Albert Vilella <avilella at gmail.com>  
wrote:

> Hi Sergei,
>
> Can you try to isolate this call with a simpler example to see if it  
> still
> fails? When you say that the problems are in the compilation, do you mean
> that the interpreter won't even compile or that it fails during  
> execution?
> Have you checked that you have all the dependencies right?
>
> Cheers,
>
>     Albert.
>
> On Wed, Apr 30, 2008 at 2:36 PM, sergei ryazansky <dr.hogart at gmail.com>
> wrote:
>
>> On Wed, 30 Apr 2008 16:47:17 +0400, Sendu Bala <bix at sendu.me.uk> wrote:
>>
>>  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.
>> >
>>
>> The rest of script,imho, is ok, because without this sub it is work  
>> fine.
>> May be problem lies into the TCoffee itself?
>>
>> One of the feature of script is to estimate the quantity of nt changes  
>> in
>> each position in the different similar sequences in comparing with  
>> consensus
>> sequences. To perform this it is nesseccary to obtain the multiply
>> alignment: the result of TCoffee alignment goes to another subroutine,  
>> that
>> estemated the level of changes. Of course, I dont think that this way  
>> is the
>> best approach, most probably there are a lot of the better ways to do  
>> it.
>> But for my today purposes it is ok.
>>
>> --
>> _______________________________________________
>> Bioperl-l mailing list
>> Bioperl-l at lists.open-bio.org
>> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>>



-- 
Отправлено M2, революционной почтовой программой Opera:  
http://www.opera.com/mail/mail/



More information about the Bioperl-l mailing list