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

Diff of /FigWebServices/index.cgi

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

revision 1.22, Fri Mar 19 22:48:15 2004 UTC revision 1.23, Sun Mar 21 02:20:55 2004 UTC
# Line 28  Line 28 
28  $ENV{"PATH"} = "$FIG_Config::bin:$FIG_Config::ext_bin:" . $ENV{"PATH"};  $ENV{"PATH"} = "$FIG_Config::bin:$FIG_Config::ext_bin:" . $ENV{"PATH"};
29    
30  my $html = [];  my $html = [];
31    
32  my @ver = `cat $FIG_Config::fig_disk/CURRENT_RELEASE`;  my @ver = `cat $FIG_Config::fig_disk/CURRENT_RELEASE`;
33  chomp $ver[0];  chomp $ver[0];
34  my $p2p_url = "p2p/seed_update_page.cgi";  my $p2p_url = "p2p/seed_update_page.cgi";
# Line 43  Line 44 
44    
45  if ($cgi->param('Search for Genes Matching an Occurrence Profile'))  if ($cgi->param('Search for Genes Matching an Occurrence Profile'))
46  {  {
47        unshift @$html, "<TITLE>The SEED: Phylogenetic Signatures</TITLE>\n";
48      my $url = $cgi->url;      my $url = $cgi->url;
49      $ENV{"REQUEST_METHOD"} = "GET";      $ENV{"REQUEST_METHOD"} = "GET";
50      $ENV{"QUERY_STRING"} = "user=$user";      $ENV{"QUERY_STRING"} = "user=$user";
# Line 61  Line 63 
63      if ($cgi->param('Find Genes in Org that Might Play the Role') &&      if ($cgi->param('Find Genes in Org that Might Play the Role') &&
64          (@orgs = $cgi->param('korgs')) && (@orgs == 1))          (@orgs = $cgi->param('korgs')) && (@orgs == 1))
65      {      {
66            unshift @$html, "<TITLE>The SEED: Genes in that Might Play Specific Role</TITLE>\n";
67          @orgs = map { $_ =~ /\((\d+\.\d+)\)/; $1 } @orgs;          @orgs = map { $_ =~ /\((\d+\.\d+)\)/; $1 } @orgs;
68          $ENV{"REQUEST_METHOD"} = "GET";          $ENV{"REQUEST_METHOD"} = "GET";
69          $ENV{"QUERY_STRING"} = "user=$user&request=find_in_org&role=$pattern&org=$orgs[0]";          $ENV{"QUERY_STRING"} = "user=$user&request=find_in_org&role=$pattern&org=$orgs[0]";
# Line 70  Line 73 
73      }      }
74      else      else
75      {      {
76            unshift @$html, "<TITLE>The SEED: Search Results</TITLE>\n";
77          &show_indexed_objects($fig, $cgi, $html, $pattern);          &show_indexed_objects($fig, $cgi, $html, $pattern);
78      }      }
79  }  }
# Line 91  Line 95 
95          $ENV{"QUERY_STRING"} = "user=$user&map=$map";          $ENV{"QUERY_STRING"} = "user=$user&map=$map";
96      }      }
97    
98        unshift @$html, "<TITLE>The SEED: Metabolic Overview</TITLE>\n";
99      my @out = `./show_kegg_map.cgi`;      my @out = `./show_kegg_map.cgi`;
100      &HTML::trim_output(\@out);      &HTML::trim_output(\@out);
101      push(@$html,@out);      push( @$html, "<br>\n", @out );
102  }  }
103    
104  #-----------------------------------------------------------------------  #-----------------------------------------------------------------------
# Line 107  Line 112 
112      @orgs = map { $_ =~ /\((\d+\.\d+)\)/; $1 } @orgs;      @orgs = map { $_ =~ /\((\d+\.\d+)\)/; $1 } @orgs;
113      if ($tool =~ /blast/)      if ($tool =~ /blast/)
114      {      {
115            unshift @$html, "<TITLE>The SEED: BLAST Search Results</TITLE>\n";
116          &run_blast($fig,$cgi,$html,$orgs[0],$tool,$seq_pat);          &run_blast($fig,$cgi,$html,$orgs[0],$tool,$seq_pat);
117      }      }
118      elsif ($tool =~ /Protein scan_for_matches/)      elsif ($tool =~ /Protein scan_for_matches/)
119      {      {
120            unshift @$html, "<TITLE>The SEED: Protein Pattern Match Results</TITLE>\n";
121          &run_prot_scan_for_matches($fig,$cgi,$html,$orgs[0],$seq_pat);          &run_prot_scan_for_matches($fig,$cgi,$html,$orgs[0],$seq_pat);
122      }      }
123      elsif ($tool =~ /DNA scan_for_matches/)      elsif ($tool =~ /DNA scan_for_matches/)
124      {      {
125            unshift @$html, "<TITLE>The SEED: Nucleotide Pattern Match Results</TITLE>\n";
126          &run_dna_scan_for_matches($fig,$cgi,$html,$orgs[0],$seq_pat);          &run_dna_scan_for_matches($fig,$cgi,$html,$orgs[0],$seq_pat);
127      }      }
128  }  }
# Line 128  Line 136 
136  #-----------------------------------------------------------------------  #-----------------------------------------------------------------------
137  else  else
138  {  {
139        unshift @$html, "<TITLE>The SEED: Entry Page</TITLE>\n";
140      &show_initial($fig,$cgi,$html);      &show_initial($fig,$cgi,$html);
141  }  }
142  &HTML::show_page($cgi,$html,1);  &HTML::show_page($cgi,$html,1);
# Line 505  Line 514 
514      #--------------------------------------------------------------------------      #--------------------------------------------------------------------------
515      if ($seq =~ /^\s*([a-zA-Z]{2,4}\|\S+)/)      if ($seq =~ /^\s*([a-zA-Z]{2,4}\|\S+)/)
516      {      {
517          my $id = $1;          # Replaced $id with $query so that output inherits label -- GJO
518            $query = $1;
519          $seq = "";          $seq = "";
520          if (($tool eq "blastp") || ($tool eq "tblastn"))          if (($tool eq "blastp") || ($tool eq "tblastn"))
521          {          {
522              $seq = $fig->get_translation($id);              $seq = $fig->get_translation($query);
523          }          }
524          elsif ($id =~ /^fig/)          elsif ($query =~ /^fig/)
525          {          {
526              my @locs;              my @locs;
527              if ((@locs = $fig->feature_location($id)) && (@locs > 0))              if ((@locs = $fig->feature_location($query)) && (@locs > 0))
528              {              {
529                  $seq = $fig->dna_seq($fig->genome_of($id),@locs);                  $seq = $fig->dna_seq($fig->genome_of($query),@locs);
530              }              }
531          }          }
532          if (! $seq)          if (! $seq)
533          {          {
534              push(@$html,$cgi->h1("Sorry, could not get sequence for $id"));              push(@$html,$cgi->h1("Sorry, could not get sequence for $query"));
535              return;              return;
536          }          }
537      }      }
# Line 539  Line 549 
549      {      {
550          $query = "query";          $query = "query";
551      }      }
552      $seq =~ s/\s//g;      $seq =~ s/\s+//g;
553      open(SEQ,">$tmp_seq")      open(SEQ,">$tmp_seq")
554          || die "could not open $tmp_seq";          || die "could not open $tmp_seq";
555      print SEQ ">$query\n$seq\n";      print SEQ ">$query\n$seq\n";

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.23

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3