[MOBY-guts] biomoby commit

Mark Wilkinson mwilkinson at pub.open-bio.org
Thu Jul 10 06:06:57 UTC 2003


mwilkinson
Thu Jul 10 02:06:57 EDT 2003
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory pub.open-bio.org:/tmp/cvs-serv2481/Perl/MOBY

Modified Files:
	Central.pm OntologyServer.pm 
Log Message:
OntologyServer was not traversing the DAG more than one level deep due to a bug.  that prevented discovery of services via decomposition.  that is now fixed.  The CGI client discovers services based on the ISA relationship type of the objct in-hand, but does not do a decomposition of that object

moby-live/Perl/MOBY Central.pm,1.94,1.95 OntologyServer.pm,1.23,1.24
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/Central.pm,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -r1.94 -r1.95
--- /home/repository/moby/moby-live/Perl/MOBY/Central.pm	2003/07/10 04:41:25	1.94
+++ /home/repository/moby/moby-live/Perl/MOBY/Central.pm	2003/07/10 06:06:57	1.95
@@ -2206,6 +2206,7 @@
 	return undef unless $term;   # and bail out if we didn't succeed
 
 	$ontology ||="service";   # if we have now succeeded and haven't already taken the ontology then it must be the service ontology
+	&_LOG("Ontology was $ontology; Term was $term\n");
 	my $OS = MOBY::OntologyServer->new(ontology => $ontology);
 	my %rels = %{$OS->Relationships(term => $term)};
 

===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/OntologyServer.pm,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- /home/repository/moby/moby-live/Perl/MOBY/OntologyServer.pm	2003/07/10 05:32:50	1.23
+++ /home/repository/moby/moby-live/Perl/MOBY/OntologyServer.pm	2003/07/10 06:06:57	1.24
@@ -798,6 +798,7 @@
     foreach (@{$defs}){
         my $lsid = $_->[0];
         my $rel = $_->[1];
+	$debug && _LOG("\t\tADDING RELATIONSHIP $_    :    $lsid to $rel\n");
         push @{$results{$rel}}, $lsid;
     }
     return \%results;  #results(relationship} = [lsid1, lsid2, lsid3]
@@ -855,20 +856,23 @@
         $IDS{$term} = "untestedroot";    # mark the one in-hand as being untested
     	while (grep /untested/, (values %IDS)){  			# now, while there are untested services in our list...
     		foreach my $termthingy(keys %IDS){ 			# start parsing through the current list (hash keys)
-                $debug && _LOG("testing TermThingy $termthingy\n");
+	                $debug && _LOG("testing $relationship of $termthingy\n");
     			next if ($IDS{$termthingy} eq "tested");  			# if it has been tested already then move on
-                my $lsids = $self->Relationships(term => $term, relationship => $relationship, direction => $direction); # get the related terms for this type; this should return a single hash value
-                if ($IDS{$termthingy} =~ /root/){  # here is where we remove self
-                    delete $IDS{$termthingy}
-                } else {
-                    $IDS{$termthingy} = "tested";   # mark the current one as now being "done"
-                }
-                #${$lsids}{relationshiptype}=[lsid, lsid, lsid];
-                foreach my $lsid(@{$lsids->{$relationship}}){  # go through the related terms
-                    $debug && _LOG("setting $lsid as untested\n");
-                    next if (defined $IDS{$lsid});   # if we have already seen that term, skip it
-                    $IDS{$lsid} = "untested"   # otherwise add it to the list and loop again.
-                }
+        	        my $lsids = $self->Relationships(term => $termthingy, relationship => $relationship, direction => $direction); # get the related terms for this type; this should return a single hash value
+                	if ($IDS{$termthingy} =~ /root/){  # here is where we remove self
+                   		delete $IDS{$termthingy};
+	            		$debug && _LOG("deleting $termthingy\n");
+                	} else {
+	                	$debug && _LOG("marking $termthingy as TESTED\n");
+                    		$IDS{$termthingy} = "tested";   # mark the current one as now being "done"
+                	}
+                	#${$lsids}{relationshiptype}=[lsid, lsid, lsid];
+                	foreach my $lsid(@{$lsids->{$relationship}}){  # go through the related terms
+                    		$debug && _LOG("found $lsid as relationship");
+                    		next if (defined $IDS{$lsid});   # if we have already seen that term, skip it
+                    		$debug && _LOG("setting $lsid as untested\n");
+                    		$IDS{$lsid} = "untested"   # otherwise add it to the list and loop again.
+                	}
     		}
     	}
         my @IDS = keys %IDS;




More information about the MOBY-guts mailing list