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

Scott Markel smarkel at accelrys.com
Sat Nov 3 06:01:38 UTC 2007


I set multiple environment variables in my code.

    $ENV{EMBOSS_ROOT}    = $embossPath;
    $ENV{EMBOSS_ACDROOT} = File::Spec->catdir($embossPath, "acd"); 
    $ENV{EMBOSS_DB_DIR}  = File::Spec->catdir($embossPath, "test");
    $ENV{EMBOSS_DATA}    = File::Spec->catdir($embossPath, "data"); 
    $ENV{PATH}           = $embossPath; 

I found it necessary to set both PATH and EMBOSS_ROOT.

Scott

Scott Markel, Ph.D.
Principal Bioinformatics Architect  email:  smarkel at accelrys.com
Accelrys (SciTegic R&D)             mobile: +1 858 205 3653
10188 Telesis Court, Suite 100      voice:  +1 858 799 5603
San Diego, CA 92121                 fax:    +1 858 799 5222
USA                                 web:    http://www.accelrys.com


bioperl-l-bounces at lists.open-bio.org wrote on 01.11.2007 11:37:24:

> 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
> >>>
> >>> -- 
> >>>
> >>> Dr. Rohit Ghai
> >>> Institute of Medical Microbiology
> >>> Faculty of Medicine
> >>> Justus-Liebig University
> >>> Frankfurter Strasse 107
> >>> 35392 - Giessen
> >>> GERMANY
> >>>
> >>> Tel  : 0049 (0)641-9946413
> >>> Fax  : 0049 (0)641-9946409
> >>> Email:  Rohit.Ghai at mikrobio.med.uni-giessen.de
> >>> <mailto:Rohit.Ghai at mikrobio.med.uni-giessen.de>
> >>>
> >>> _______________________________________________
> >>> Bioperl-l mailing list
> >>> Bioperl-l at lists.open-bio.org <mailto:Bioperl-l at lists.open-bio.org>
> >>> http://lists.open-bio.org/mailman/listinfo/bioperl-l
> >>
> >> --
> >> Jason Stajich
> >> jason at bioperl.org <mailto:jason at bioperl.org>
> >>
> >
> > -- 
> >
> > Dr. Rohit Ghai
> > Institute of Medical Microbiology
> > Faculty of Medicine
> > Justus-Liebig University
> > Frankfurter Strasse 107
> > 35392 - Giessen
> > GERMANY
> >
> > Tel  :   0049 (0)641-9946413
> > Fax  :   0049 (0)641-9946409
> > Email:  Rohit.Ghai at mikrobio.med.uni-giessen.de
> >
> > _______________________________________________
> > Bioperl-l mailing list
> > Bioperl-l at lists.open-bio.org
> > http://lists.open-bio.org/mailman/listinfo/bioperl-l
> 
> --
> Jason Stajich
> jason at bioperl.org
> 
> _______________________________________________
> 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