[MOBY-guts] biomoby commit

Mark Wilkinson mwilkinson at pub.open-bio.org
Mon Jul 14 23:32:39 UTC 2003


mwilkinson
Mon Jul 14 19:32:39 EDT 2003
Update of /home/repository/moby/moby-live/Perl/scripts/Services
In directory pub.open-bio.org:/tmp/cvs-serv2590/Services

Modified Files:
	LocalServices.pm 
Log Message:
format for the go configuration at flybase has changed.  Recoded to compensate

moby-live/Perl/scripts/Services LocalServices.pm,1.20,1.21
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/scripts/Services/LocalServices.pm,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- /home/repository/moby/moby-live/Perl/scripts/Services/LocalServices.pm	2003/07/14 22:56:57	1.20
+++ /home/repository/moby/moby-live/Perl/scripts/Services/LocalServices.pm	2003/07/14 23:32:39	1.21
@@ -88,23 +88,22 @@
 	my $ua = new LWP::UserAgent;
 	my $req = new HTTP::Request GET => 'http://www.godatabase.org/dev/database/server.cfg';
 	my $res = $ua->request($req);
-	my $host;
+	my $host; my $dbname;
 	if ($res->is_success) {
 		my $resp =  $res->content;
-		$host = ($resp =~ /\w+\s+(.*)/ && $1);
-		&_LOG("found go database server at $host\n");
-	} else {
-		&_LOG("can't connect to godatabase nameserver\n");
-		return SOAP::Data->type('base64' => responseHeader() . responseFooter());  # base 64 encode it (optional)
+		if ($resp =~ /(\w+)\@(\S+)/){
+			$host = $2;
+			$dbname= $1;
+		} else {
+			return SOAP::Data->type('base64' => responseHeader() . responseFooter());  # base 64 encode it (optional)
+		}
 	}
 	my %connect_hash;
-	$connect_hash{-dbname}="go";
+	$connect_hash{-dbname}=$dbname;
 	$connect_hash{-dbhost}=$host;
 	
 	my $GO_API = GO::AppHandle->connect(%connect_hash);
-	&_LOG("made connection $GO_API\n");
 	unless ($GO_API){
-		&_LOG("unable to connect to the GO database at $host\n");
 		return SOAP::Data->type('base64' => responseHeader() . responseFooter());  # base 64 encode it (optional)
 	}
 	
@@ -123,11 +122,8 @@
 		my $input =  $_->[0];  # we only allow one input object per query
 		my ($kw) = getSimpleArticleIDs($VALID_NAMESPACE, [$input]);
 		($kw) = (($kw =~ /^\s*(.*)\s*$/) && ($1));
-		_LOG("searching for ||$kw||\n");
 		my @terms = @{$GO_API->get_terms({search=>"$kw"})};
-		_LOG("found term $terms[0]");
 		next unless($terms[0]);
-		_LOG("found term $terms[0]");
 		my @simples;
 		foreach my $term(@terms){
 			my $acc = $term->public_acc;




More information about the MOBY-guts mailing list