[MOBY-guts] biomoby commit

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


mwilkinson
Thu Jul 10 17:57:27 EDT 2003
Update of /home/repository/moby/moby-live/Perl/scripts/Services
In directory pub.open-bio.org:/tmp/cvs-serv6546/Perl/scripts/Services

Modified Files:
	LocalServices.pm 
Log Message:
small bugs in the new totally cool service.

moby-live/Perl/scripts/Services LocalServices.pm,1.13,1.14
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/scripts/Services/LocalServices.pm,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- /home/repository/moby/moby-live/Perl/scripts/Services/LocalServices.pm	2003/07/10 20:43:47	1.13
+++ /home/repository/moby/moby-live/Perl/scripts/Services/LocalServices.pm	2003/07/10 21:57:27	1.14
@@ -209,10 +209,9 @@
     my ($self, $data) = @_;
     my $response; my @gis;
 	my $OS = MOBY::Client::OntologyServer->new;
-
 	my ($s, $m, $GB_Acc_LSID) = $OS->namespaceExists(term => "NCBI_Acc");
 	my ($s2, $m2, $GB_gi_LSID) = $OS->namespaceExists(term => "NCBI_gi");
-	
+
 	unless ($s && $s2){  # unless we could get the known namespace LSID's we should bail because somethign is very very wrong!
 		my $fullresponse =  responseHeader() . responseFooter();  # add the headers and footers
 		my $SOAPResponse = SOAP::Data->type('base64' => $fullresponse);  # base 64 encode it (optional)
@@ -221,6 +220,7 @@
 	
 	my @input_nodes = $self->_getSimpleChildNodes($data);
 	foreach my $node(@input_nodes){
+ 
 		my $namespace_LSID = $self->_getNamespaceURI($node);  # get the LSID of the namespace for this input object
 		my @IDs= $self->_getIDs($namespace_LSID, [$node]);  # get the ID within this namespace
 		my $ID = $IDs[0];  # there is only one, so this is safe
@@ -248,7 +248,8 @@
 			$response .= simpleResponse("");  # if we got nada, then send a blank as required
 			next;
 		}
-		my $gi = $seq->prinary_id;		  # e.g. 163483
+
+		my $gi = $seq->primary_id;		  # e.g. 163483
 		my $acc = $seq->accession;        # e.g. A123434
 		my $kw = $seq->species->binomial; # e.g. mus musculus
 		my $moltype = $seq->alphabet;     #  'dna', 'rna', 'protein'
@@ -263,14 +264,14 @@
 			my $tempresponse .= "
 		<moby:$ObjectType namespace='$namespace_LSID' id='$ID'>
 			<CrossReference>";
-			if ($taxon){ $response .="<Object namespace='taxon' id='$taxon'/>"}
-			if ($kw){$response .="<Object namespace='Global_Keyword' id='$kw'/>"}
-			if ($acc && !($namespace_LSID eq $GB_Acc_LSID)){$response .="<Object namespace='NCBI_Acc' id='$acc'/>"}
-			if ($gi && !($namespace_LSID eq $GB_gi_LSID)){$response .="<Object namespace='NCBI_gi' id='$gi'/>"}
-			$response .="</CrossReference>
+			if ($taxon){ $tempresponse .="<Object namespace='taxon' id='$taxon'/>"}
+			if ($kw){$tempresponse .="<Object namespace='Global_Keyword' id='$kw'/>"}
+			if ($acc && !($namespace_LSID eq $GB_Acc_LSID)){$tempresponse .="<Object namespace='NCBI_Acc' id='$acc'/>"}
+			if ($gi && !($namespace_LSID eq $GB_gi_LSID)){$tempresponse .="<Object namespace='NCBI_gi' id='$gi'/>"}
+			$tempresponse .="</CrossReference>
 			<moby:Int namespace='' id='' articleName='Length'>$length</moby:Int>
 			<moby:String namespace='' id='' articleName='SequenceString'>$sequence</moby:String>
-		</moby:GenericSequence>";
+		</moby:$ObjectType>";
 			$response .= simpleResponse($tempresponse);
 		} else {
 			$response .= simpleResponse("");  # if we failed to get a sequence length, then something weird happened, so just ignore it




More information about the MOBY-guts mailing list