[Bio] / FigKernelPackages / FIG.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/FIG.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.682, Wed Apr 16 00:55:53 2008 UTC revision 1.683, Thu Apr 17 20:45:23 2008 UTC
# Line 3554  Line 3554 
3554      }      }
3555  }  }
3556    
3557    =head3 find_fig_executable
3558    
3559    C<< $path = FIG::find_fig_executable("index_sims_file") >>
3560    
3561    Looks for the given executable first in $FIG_Config::ext_bin, then in
3562    $FIG_Config::bin. Supports code running either in the original SEED
3563    world which had C programs build as part of FigKernelScripts and the new
3564    world which puts them into the common runtime.
3565    
3566    =cut
3567    
3568    sub find_fig_executable
3569    {
3570        my($exe) = @_;
3571        my $path;
3572        if (-x ($path = "$FIG_Config::ext_bin/$exe"))
3573        {
3574            return $path;
3575        }
3576        elsif (-x ($path = "$FIG_Config::bin/$exe"))
3577        {
3578            return $path;
3579        }
3580        else
3581        {
3582            cluck "FIG executable '$exe' not found in standard locations";
3583            return $exe;
3584        }
3585    }
3586    
3587  =head3 augment_path  =head3 augment_path
3588    
# Line 10472  Line 10501 
10501      return $out;      return $out;
10502  }  }
10503    
10504    =head3 get_figfams_data
10505    
10506    usage: $dir = $fig->get_figfams_data($mydir)
10507    usage: $dir = &FIG::get_figfams_data($mydir)
10508    
10509    Returns the Figfams data directory to use. If $mydir is passed, use that value. Otherwise
10510    see if $FIG_Config::FigfamsData is defined, and use that. Otherwise default to
10511    $FIG_Config::data/FigfamsData.
10512    
10513    =cut
10514    
10515    sub get_figfams_data
10516    {
10517        shift if UNIVERSAL::isa($_[0],__PACKAGE__);
10518    
10519        my ($dir) = @_;
10520    
10521        if (defined($dir))
10522        {
10523            return $dir;
10524        }
10525        if ($FIG_Config::FigfamsData ne '')
10526        {
10527            return $FIG_Config::FigfamsData;
10528        }
10529        return "$FIG_Config::data/FigfamsData";
10530    }
10531    
10532  =head3 dsims  =head3 dsims
10533    
10534  usage: @sims = $fig->dsims($id,$seq,$maxN,$min_nbsc)  usage: @sims = $fig->dsims($id,$seq,$maxN,$min_nbsc)
# Line 10494  Line 10551 
10551      my($self,$id,$seq,$maxN,$min_nbsc,$figfams_data,$blast_parms) = @_;      my($self,$id,$seq,$maxN,$min_nbsc,$figfams_data,$blast_parms) = @_;
10552      my($sim,$partition,%hits);      my($sim,$partition,%hits);
10553    
10554      if (! $figfams_data) { $figfams_data = "$FIG_Config::data/FigfamsData" }      $figfams_data = $self->get_figfams_data($figfams_data);
10555    
10556      my $reps_db = "$figfams_data/repdb";      my $reps_db = "$figfams_data/repdb";
10557    
10558      (-s $reps_db) || return ();      (-s $reps_db) || return ();

Legend:
Removed from v.1.682  
changed lines
  Added in v.1.683

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3