#!/usr/bin/perl # chooser script - sends the search data to google or to AmiGO use CGI::Carp qw(fatalsToBrowser); use strict; use constant GODB => 'http://amigo.geneontology.org/'; my $qs = $ENV{'QUERY_STRING'}; if ($qs =~ /search_query=(.*?)&search_constraint=(.*)/) { my $query = $1; my $search = $2; if ($search eq "terms") { print "Location: ". GODB ."cgi-bin/amigo/search.cgi?search_query=$query&action=new-search&search_constraint=term\n\n" } elsif ($search eq "gp") { print "Location: ". GODB ."cgi-bin/amigo/search.cgi?search_query=$query&action=new-search&search_constraint=gp\n\n" } else { print "Location: http://www.google.com/search?q=" . $query . "&cof=L%3Ahttp%3A%2F%2Fwww.geneontology.org%2Fimages%2FGO-header-logo.jpg%3BAH%3Aleft%3BGL%3A0%3BS%3Ahttp%3A%2F%2Fwww.geneontology.org%3BAWFID%3A56b9e4624af96ab2%3B&domains=geneontology.org&sitesearch=geneontology.org\n\n"; # old URL #http://www.google.com/search?hl=en&lr=&ie=ISO-8859-1&q=$query%20site%3Awww.geneontology.org\n\n"; } } else { print "Location: http://www.geneontology.org/QS=$qs\n\n"; } exit;