[MOBY-guts] biomoby commit

Mark Wilkinson mwilkinson at pub.open-bio.org
Mon Feb 9 23:27:34 UTC 2004


mwilkinson
Mon Feb  9 18:27:34 EST 2004
Update of /home/repository/moby/moby-live/Perl/scripts/Services
In directory pub.open-bio.org:/tmp/cvs-serv1869/Services

Modified Files:
	LocalServices.pm 
Log Message:
added a get 3D Sequence Neighbours: Retrieves a list of protein BLAST neighbours possessing 3-D structure. Uses redundancy information for the query protein. The BLAST protein neighbours were calculated using 0.01 maximum E-value cutoff.

moby-live/Perl/scripts/Services LocalServices.pm,1.58,1.59
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/scripts/Services/LocalServices.pm,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- /home/repository/moby/moby-live/Perl/scripts/Services/LocalServices.pm	2004/02/09 23:16:23	1.58
+++ /home/repository/moby/moby-live/Perl/scripts/Services/LocalServices.pm	2004/02/09 23:27:34	1.59
@@ -227,6 +227,41 @@
 }
 
 
+sub getSHound3DNeighboursFromGi {  # WORKS
+    my ($caller, $data) = @_;
+    my $MOBY_RESPONSE;
+    my (@inputs)= genericServiceInputParser($data); # ([SIMPLE, $queryID, $simple],...)
+    return SOAP::Data->type('base64' => responseHeader("illuminae.com") . responseFooter()) unless (scalar(@inputs));
+
+    my ($validNS) = validateNamespaces("NCBI_gi");  # ONLY do this if you are intending to be namespace aware!
+    return SOAP::Data->type('base64' => (responseHeader("illuminae.com") . responseFooter)) unless $validNS;
+
+    foreach (@inputs){
+        my ($articleType, $qID, $input) = @{$_};
+        unless (($articleType == SIMPLE) && ($input) ){
+            $MOBY_RESPONSE .= collectionResponse([], "", $qID) ;
+            next;
+        } else {
+            my $namespace = getSimpleArticleNamespaceURI($input);
+			my ($identifier) = getSimpleArticleIDs($input);  # note array output!
+            (($MOBY_RESPONSE .= collectionResponse([], "", $qID)) && next) unless ($namespace eq $validNS);
+			my $proteinGIs = SHound3DNeighboursFromGi($identifier,0.01);
+            (($MOBY_RESPONSE .= collectionResponse([], "", $qID)) && next) unless ($proteinGIs);
+			my @proteinGIs = split ",", $proteinGIs;
+			my @simples;
+			foreach my $gi (@proteinGIs){
+				next unless $gi;
+				$gi =~ s/\s//g;
+	            push @simples, "<Object namespace='NCBI_gi' id='$gi'/>";
+			}
+			$MOBY_RESPONSE .= collectionResponse(\@simples, "", $qID);
+        }
+    }
+	print STDERR responseHeader("illuminae.com") . $MOBY_RESPONSE . responseFooter;
+    return SOAP::Data->type('base64' => (responseHeader("illuminae.com") . $MOBY_RESPONSE . responseFooter));    
+}
+
+
 sub getSHoundDNAFromOrganism {  # WORKS
     my ($caller, $data) = @_;
     my $MOBY_RESPONSE;




More information about the MOBY-guts mailing list