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

Diff of /FigKernelPackages/FIG_CGI.pm

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

revision 1.5, Sat Aug 5 03:10:01 2006 UTC revision 1.7, Thu Dec 6 13:48:11 2007 UTC
# Line 35  Line 35 
35    
36  use strict;  use strict;
37  use FIG;  use FIG;
38    use FIGV;
39  use FIG_Config;  use FIG_Config;
40  use CGI;  use CGI;
41  use Data::Dumper;  use Data::Dumper;
# Line 44  Line 45 
45    
46  =head3 init  =head3 init
47    
48  C<< my($fig, $cgi, $user) = FIG_CGI::init(debug_save => 0, debug_load => 0, print_params => 0); >>      my($fig, $cgi, $user) = FIG_CGI::init(debug_save => 0, debug_load => 0, print_params => 0);
49    
50  Initialize a FIG and CGI object for use in the CGI script. Depending on the  Initialize a FIG and CGI object for use in the CGI script. Depending on the
51  CGI parameters passed in, the FIG object will be either an actual FIG object  CGI parameters passed in, the FIG object will be either an actual FIG object
# Line 125  Line 126 
126    
127  =head3 is_sprout  =head3 is_sprout
128    
129  C<< my $flag = is_sprout($object); >>      my $flag = is_sprout($object);
130    
131  Return TRUE if we are running in Sprout mode, else FALSE.  Return TRUE if we are running in Sprout mode, else FALSE.
132    
# Line 187  Line 188 
188      }      }
189      else      else
190      {      {
191            if (my $job = $cgi->param("48hr_job"))
192            {
193                my $jobdir = "/vol/48-hour/Jobs/$job";
194                my $genome = &FIG::file_head("$jobdir/GENOME_ID");
195                chomp $genome;
196                if ($genome !~ /^\d+\.\d+/)
197                {
198                    die "Cannnot find genome ID for jobdir $jobdir\n";
199                }
200                my $orgdir = "$jobdir/rp/$genome";
201                if (! -d $orgdir)
202                {
203                    die "Cannot find orgdir $orgdir\n";
204                }
205                $fig = new FIGV($orgdir);
206            }
207            else
208            {
209          $fig = new FIG;          $fig = new FIG;
210      }      }
211        }
212      return $fig;      return $fig;
213  }  }
214    

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.7

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3