in reply to Re^3: how to combine these two scripts in perl?
in thread how to combine these two scripts in perl?

please excuse me for the confusion. I edited my previous comment. I have 3 different things in my mind:

I want to highlight also that  $aln at the last line of the first script has the alignment.

#I tried at first to pass this alignment to the my $alnio = Bio::AlignIO but didn't succeed it.

##My second try was changing  $factory and outputting a file(out_file) from my $factory = Bio::Tools::Run::Alignment::Clustalw->new(-matrix => 'BLOSUM','outfile' => 'out_file','outype'=clustalw); in order to use it in my $alnio = Bio::AlignIO->new('-file'=> 'out_file','-format' => 'clustalw');

This is what I was searching to do through a variable and not a file

###Thrird, now I'm thinking of finding a way to delete the file out_file

after it is used from

my $alnio = Bio::AlignIO but seems me not the right way.

Replies are listed 'Best First'.
Re^5: how to combine these two scripts in perl?
by poj (Abbot) on Mar 15, 2016 at 17:11 UTC

    I know nothing about bioinformatics but have you tried using the object returned by ->align in the iterator loop ?

    #!perl my $factory = Bio::Tools::Run::Alignment::Clustalw ->new(-matrix => 'BLOSUM'); . . . my $alnio = $factory->align($seq_array_ref); while( my $aln = $alnio->next_aln ) { . . }
    poj