[Bioperl-l] Bio::Tools::Run::Alignment::MAFFT - specifyingalignment parameters

Mark A. Jensen maj at fortinbras.us
Fri May 7 15:34:09 UTC 2010


Hi Oliver, 

I think so, looking at the module again. Instead of the lines in the previous post,
put

push @Bio::Tools::Run::Alignment::MAFFT::MAFFT_SWITCHES, '(LOCALPAIR', 'MAXITERATE');
$Bio::Tools::Run::Alignment::MAFFT::OK_FIELD{MAXITERATE} = 1;
$Bio::Tools::Run::Alignment::MAFFT::OK_FIELD{LOCALPAIR} = 1;

and create your @params array with

@params = ('localpair' => 1, 'maxiterate' => 1000);

The switches need to be set with something that returns true, I believe. I *think*
this should work for you. But if you would, please submit your original problem
as a bug at http://bugzilla.bioperl.org. The module definitely needs some tender 
loving care.

Thanks
Mark
  ----- Original Message ----- 
  From: Dr. Oliver Niehuis 
  To: Mark A. Jensen 
  Sent: Friday, May 07, 2010 11:07 AM
  Subject: Re: [Bioperl-l] Bio::Tools::Run::Alignment::MAFFT - specifyingalignment parameters


  Dear Mark,


  Thanks for your quick reply and the MAFFT module hack. I added your code to my script and it seems to works, except that I can't specify the number of iterations (at least, I don't know how). I can specify 


  my @params = ('localpair', 'maxiterate');


  but when I assign 1000 to 'maxiterate' (i.e. 'maxiterate' => 1000), I get again an exception error, complaining about 1000 being an unallowed parameter.  


  ------------- EXCEPTION -------------
  MSG: Unallowed parameter: 1000 !
  STACK Bio::Tools::Run::Alignment::MAFFT::AUTOLOAD /sw/lib/perl5/5.8.8/Bio/Tools/Run/Alignment/MAFFT.pm:211
  STACK Bio::Tools::Run::Alignment::MAFFT::new /sw/lib/perl5/5.8.8/Bio/Tools/Run/Alignment/MAFFT.pm:196
  STACK toplevel /Users/Oliver/Desktop/Orthologs/Generate_FASTA_files_of_orthologs.pl:61
  -------------------------------------


  Do you know how to fix this?


  Best wishes,
  Oliver




  Am 07.05.2010 um 13:53 schrieb Mark A. Jensen:


    Hi Oliver,
    This module looks like it needs some updating. Here's a hack
    that should make it work (or at least prevent that exception);
    put the following lines before the new() call:

    push @Bio::Tools::Run::Alignment::MAFFT::MAFFT_PARAMS, 'MAXITERATE';
    push @Bio::Tools::Run::Alignment::MAFFT::MAFFT_SWITCHES, 'LOCALPAIR';
    $Bio::Tools::Run::Alignment::MAFFT::OK_FIELD{MAXITERATE} = 1;
    $Bio::Tools::Run::Alignment::MAFFT::OK_FIELD{LOCALPAIR} = 1;

    HTH,
    Mark

    ----- Original Message ----- From: "Dr. Oliver Niehuis" <O.Niehuis.zfmk at uni-bonn.de>
    To: <bioperl-l at lists.open-bio.org>
    Sent: Friday, May 07, 2010 2:34 AM
    Subject: [Bioperl-l] Bio::Tools::Run::Alignment::MAFFT - specifyingalignment parameters



      Hi,



      I have a question about how to specify parameters for the alignment  program MAFFT via the Bio::Tools::Run::Alignment::MAFFT module. I  would like to run MAFFT with the following alignment parameters:



      --maxiterate 1000 --localpair



      Having used TCOFFEE and the Bio::Tools::Run::Alignment::Tcoffee module before, I specified the MAFFT run parameters as follows:



      @params = ('localpair', 'maxiterate' => 1000);

      $factory = Bio::Tools::Run::Alignment::MAFFT->new(@params);



      Unfortunately, this code causes an exception error:



      ------------- EXCEPTION -------------

      MSG: Unallowed parameter: LOCALPAIR !

      STACK Bio::Tools::Run::Alignment::MAFFT::AUTOLOAD /sw/lib/perl5/5.8.8/ Bio/Tools/Run/Alignment/MAFFT.pm:211

      STACK Bio::Tools::Run::Alignment::MAFFT::new /sw/lib/perl5/5.8.8/Bio/ Tools/Run/Alignment/MAFFT.pm:196

      STACK toplevel /Users/Oliver/Desktop/Orthologs/ Generate_FASTA_files_of_orthologs.pl:55

      -------------------------------------



      I can align sequences with MAFFT via Bio::Tools::Run::Alignment::MAFFT module, but only when leaving the @params array empty; MAFFT then runs  with the default parameters.



      Has anyone an idea how I can specify run parameters for MAFFT via the Bio::Tools::Run::Alignment::MAFFT module?



      Any help is much appreciated!



      Best wishes,

      Oliver

      _______________________________________________

      Bioperl-l mailing list

      Bioperl-l at lists.open-bio.org

      http://lists.open-bio.org/mailman/listinfo/bioperl-l








More information about the Bioperl-l mailing list