[Bioperl-l] bioperl: cannot run emboss programs using bioperlon windows

Rohit Ghai Rohit.Ghai at mikrobio.med.uni-giessen.de
Sat Nov 3 14:07:52 UTC 2007


Dear all, thanks for all the different inputs on this topic, I was able 
to run emboss applications on windows (vista), but with the following 
workaround.

Chris suggested to remove EMBOSSwin and get another version. This I did. 
Scott suggested setting all the variables within the program. This I 
also tried, but
actually these were already available to the program so this was also 
not the problem. The following line...

my $fuzznuc = $f->program('fuzznuc')

doesn't return a Bio::Tools::Run::EMBOSSApplication object. but using 
Bio::Tools::Run::EMBOSSApplication directly seems to work. It doesn't 
have any
path issues. What is also curious is that $f->version returns the 
correct version of emboss running (no path problems here), and it looks 
like it
runs the command "embossversion -auto" to get this information. If it 
can get at this command, its a bit peculiar why it cannot get the other 
programs. Or
am I missing something here ?


Please take a look at the code, I have commented within this...


-Rohit


use Bio::Factory::EMBOSS;
use Data::Dumper;
use Bio::Tools::Run::EMBOSSApplication;


my $infile = "test.fasta";
my $motif  = "AGGAGG";
my $outfile = "test.out";


     my $f = Bio::Factory::EMBOSS->new();
     # get an EMBOSS application  object from the factory
    print Dumper $f;  
   
    print "location=",$f->location,"\n";   #returns local
    print "version=", $f->version,"\n";    #  this returns the correct 
version 5.0 (uses embossversion -auto internally, and seems to know 
where it is)
    print "info=", $f->program_info('fuzznuc'),"\n"; #returns nothing
    print "list=",$f->_program_list,"\n";  #returns nothing
   
    #however, my $fuzznuc = $f->program('fuzznuc'); or with path / or \\ 
or with exe suffix doesn't work
    #$fuzznuc->executable('C:/mEMBOSS/fuzznuc'); # doesnt work
    # the problem is that it does not return a 
Bio::Tools::Run::EMBOSSApplication object.
   
   
    #however, creating a EMBOSSApplication object directly makes it 
possible to run the program
    #
    my $application = Bio::Tools::Run::EMBOSSApplication->new();
    $application->name('fuzznuc');   
    print Dumper $application;
    $application->run(
                   { -sequence  => $infile,
                     -pattern   => $motif,
                     -outfile   => $outfile                      
               });   
    print "Done\n";
   
    exit;










Chris Fields wrote:
> I did a little investigating using my old PC and was able to get 
> fuzznuc to run using BioPerl and EMBOSS v5.  I had to jump through a 
> hoop or two but I managed to get it working.
>
> First, realize that EMBOSSWin is NOT the latest EMBOSS for Windows.  
> You need to remove EMBOSSWin and install the one I linked to 
> previously (this is an actual EMBOSS beta release).  It's possible 
> older EMBOSSWin can be configured, but I don't plan on checking it out 
> myself.
>
> Next, you need to ensure the binaries are in your PATH env. variable 
> (test by running 'wossname' on the command line), then set EMBOSS_DATA 
> to point at the EMBOSS data directory using a UNIX-like path (i.e. 
> 'C:/mEMBOSS/data'); regular Win32 paths didn't work for me and WinXP 
> recognizes the UNIX'y form as a valid path.  If you don't know how to 
> set env. variables go here:
>
> http://vlaurie.com/computers2/Articles/environment.htm
>
> Once that is set up you should be able to run the script using the 
> latest (greatest?) EMBOSS.
>
> chris
>
> On Nov 1, 2007, at 1:41 PM, Rohit Ghai wrote:
>
>> Hi Jason
>>
>> I tried this as well. This also gives the same error message.
>>
>> -Rohit
>>
>> Jason Stajich wrote:
>>> You could try this - can't test it though so not sure.
>>> my $fuzznuc = $f->program('fuzznuc');
>>> $fuzznuc->executable('C:\EMBOSSwin\fuzznuc');
>>>
>>> -jason
>>> On Nov 1, 2007, at 2:06 PM, Rohit Ghai wrote:
>>>
>>>>
>>>>
>>>> Thanks for all the suggestions... but I unfortunately still cannot run
>>>> emboss. I am running the latest version of embosswin  
>>>> (2.10.0-Win-0.8),
>>>> and the
>>>> path is set correctly. I printed $ENV{$PATH} and this contains
>>>> C:\EMBOSSwin which is the correct location.
>>>> I also tried setting the path directly but I'm not sure how to do 
>>>> this,
>>>> so I tried this...
>>>>
>>>> my $fuzznuc = $f->program('C:\\EMBOSSwin\\fuzznuc');
>>>>
>>>> this also did not work.
>>>>
>>>> Also tried printing...
>>>> $fuzznuc->executable()
>>>>
>>>> gave the following error again
>>>> -------------------- WARNING ---------------------
>>>> MSG: Application [C:\EMBOSSwin\fuzznuc] is not available!
>>>> ---------------------------------------------------
>>>>
>>>> Any more ideas ?
>>>>
>>>> thanks !
>>>> Rohit
>>>>
>>>>
>>>> here's the code...
>>>>
>>>> use strict;
>>>> use Bio::Factory::EMBOSS;
>>>> use Data::Dumper;
>>>>
>>>> #
>>>> # print "PATH=$ENV{PATH}\n";
>>>> # path contains C:\EMBOSSwin which is the correct location
>>>> # embossversion is 2.10.0-Win-0.8
>>>>
>>>>  my $f = Bio::Factory::EMBOSS->new();
>>>>  # get an EMBOSS application  object from the factory
>>>>  print Dumper ($f);
>>>>  my $fuzznuc = $f->program('C:\\EMBOSSwin\\fuzznuc'); #tried 
>>>> fuzznuc.exe
>>>> as well,
>>>>  print Dump ($fuzznuc);
>>>>
>>>>  #dump of fuzznuc
>>>>  #$VAR1 = bless( {
>>>>  #                '_programgroup' => {},
>>>>  #                '_programs' => {},
>>>>  #                '_groups' => {}
>>>>  #              }, 'Bio::Factory::EMBOSS' );
>>>>
>>>>  #print "executing -- >", $fuzznuc->executable, "\n" ; # doesn't work
>>>>
>>>>  my $infile = "temp.fasta";
>>>>  my $motif  = "ATGTCGATC";
>>>>  my $outfile = "test.out";
>>>>
>>>>
>>>>  $fuzznuc->run(
>>>>                   { -sequence  => $infile,
>>>>                     -pattern   => $motif,
>>>>                     -outfile   => $outfile
>>>>               });
>>>>
>>>> Here's the error again....
>>>>
>>>> #-------------------- WARNING ---------------------
>>>> #MSG: Application [C:\EMBOSSwin\fuzznuc] is not available!
>>>> #---------------------------------------------------
>>>>
>>>>
>>>>
>>>>
>>>> Jason Stajich wrote:
>>>>> Presumably the PATH is not getting set properly - you should play
>>>>> around printing the $ENV{PATH} variable in a perl script to see if
>>>>> actually contains the directory where the emboss programs are
>>>>> installed.  Bioperl can only guess so much as to where to find an
>>>>> application.  It is also possible that we aren't creating the proper
>>>>> path to the executable - you can print the executable path with
>>>>> print $fuzznuc->executable
>>>>> I believe unless it is throwing an error at the program() line.
>>>>>
>>>>> It looks like the code in the Factory object is a little fragile
>>>>> assuming that the programs HAVE to be in your $PATH.  I don't know if
>>>>> windows+perl is special in any way that it run things so I can't
>>>>> really tell if there is specific things you have to do here. You may
>>>>> have to run this through cygwin in case PATH and such are just not
>>>>> available properly to windowsPerl.
>>>>>
>>>>> -jason
>>>>> On Nov 1, 2007, at 5:45 AM, Rohit Ghai wrote:
>>>>>
>>>>>> Dear all,
>>>>>>
>>>>>> I have emboss installed on a windows machine. (Embosswin). I can run
>>>>>> this from the dos command line and the path is present. However,
>>>>>> when I
>>>>>> try to call
>>>>>> an emboss application from bioperl I get a "Application not found
>>>>>> error"
>>>>>>
>>>>>>
>>>>>>   my $f = Bio::Factory::EMBOSS->new();
>>>>>>   # get an EMBOSS application  object from the factory
>>>>>>   my $fuzznuc = $f->program('fuzznuc');
>>>>>>     $fuzznuc->run(
>>>>>>                   { -sequence  => $infile,
>>>>>>                         -pattern   => $motif,
>>>>>>                        -outfile   => $outfile
>>>>>>               });
>>>>>>  gives the following error
>>>>>>
>>>>>> -------------------- WARNING ---------------------
>>>>>> MSG: Application [fuzznuc] is not available!
>>>>>> ---------------------------------------------------
>>>>>> Can't call method "run" on an undefined value at searchPatterns.pl
>>>>>> line
>>>>>> 102.
>>>>>>
>>>>>> Can somebody help me fix this ?
>>>>>>
>>>>>> best regards
>>>>>> Rohit
>>>>>>
>>>>>> -- 
>>>>>>
>
>




More information about the Bioperl-l mailing list