[Bio] / FigWebServices / protein.cgi Repository:
ViewVC logotype

Diff of /FigWebServices/protein.cgi

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

revision 1.55, Sun Jan 9 17:15:12 2005 UTC revision 1.56, Wed Jan 12 21:22:08 2005 UTC
# Line 1  Line 1 
1    
2  use FIG;  use FIG;
3  #use SproutFIG;  
4    my $sproutAvail = eval {
5        require SproutFIG;
6        require PageBuilder;
7    };
8    
9    if (!$sproutAvail)
10    {
11        warn "Sprout library not available: $@\n";
12    }
13    else
14    {
15        warn "Sprout libs found\n";
16    }
17    
18  use FIGGenDB;  use FIGGenDB;
19  use FIGjs;  use FIGjs;
20    
# Line 44  Line 58 
58  my($fig_or_sprout);  my($fig_or_sprout);
59  if ($cgi->param('SPROUT'))  if ($cgi->param('SPROUT'))
60  {  {
61      $fig_or_sprout = new SproutFIG;      $fig_or_sprout = new SproutFIG($FIG_Config::sproutDB, $FIG_Config::sproutData);
62  }  }
63  else  else
64  {  {
# Line 296  Line 310 
310      unshift @{$html->{general}}, "<TITLE>The SEED: Protein Page</TITLE>\n";      unshift @{$html->{general}}, "<TITLE>The SEED: Protein Page</TITLE>\n";
311    
312      my $gs = &org_of($fig_or_sprout,$prot);      my $gs = &org_of($fig_or_sprout,$prot);
313        warn "got gs=$gs prot=$prot $fig_or_sprout\n";
314      if ($prot =~ /^fig\|\d+\.\d+\.peg/)      if ($prot =~ /^fig\|\d+\.\d+\.peg/)
315      {      {
316          if (! &is_real_feature($fig_or_sprout,$prot))          if (! &is_real_feature($fig_or_sprout,$prot))
# Line 351  Line 366 
366          my($contig,$beg,$end) = &boundaries_of($fig_or_sprout,$loc);          my($contig,$beg,$end) = &boundaries_of($fig_or_sprout,$loc);
367          my $min = &max(0,&min($beg,$end) - $half_sz);          my $min = &max(0,&min($beg,$end) - $half_sz);
368          my $max = &max($beg,$end) + $half_sz;          my $max = &max($beg,$end) + $half_sz;
369            warn "display_peg: min=$min max=$max beg=$beg end=$end\n";
370          my($feat,$min,$max) = &genes_in_region($fig_or_sprout,&genome_of($peg),$contig,$min,$max);          my($feat,$min,$max) = &genes_in_region($fig_or_sprout,&genome_of($peg),$contig,$min,$max);
371    
372          my ($beg,$end,$genes) = &print_context($fig_or_sprout,$cgi,$html->{contig_context},$peg,$feat,$min,$max);          my ($beg,$end,$genes) = &print_context($fig_or_sprout,$cgi,$html->{contig_context},$peg,$feat,$min,$max);
# Line 1072  Line 1088 
1088    
1089  sub print_context {  sub print_context {
1090      my($fig_or_sprout,$cgi,$html,$peg,$feat,$beg,$end) = @_;      my($fig_or_sprout,$cgi,$html,$peg,$feat,$beg,$end) = @_;
1091    
1092        warn "print_context ", Dumper(\@_);
1093      my($contig1,$beg1,$end1,$strand,$max_so_far,$gap,$comment,$fc,$aliases);      my($contig1,$beg1,$end1,$strand,$max_so_far,$gap,$comment,$fc,$aliases);
1094      my($why_related,$fid1,$sz,$color,$map,$gg,$n,$link,$in_neighborhood);      my($why_related,$fid1,$sz,$color,$map,$gg,$n,$link,$in_neighborhood);
1095    
# Line 1769  Line 1787 
1787      }      }
1788      else      else
1789      {      {
1790          if ($cgi->param('SPROUT'))          warn Dumper($html);
1791            if ($cgi->param('FSPROUT'))
1792          {          {
1793              &HTML::BuildPage($html);  #           &HTML::BuildPage($html);
1794          }          }
1795          else          else
1796          {          {

Legend:
Removed from v.1.55  
changed lines
  Added in v.1.56

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3