[MOBY-guts] biomoby commit
Mark Wilkinson
mwilkinson at pub.open-bio.org
Mon Feb 9 23:16:23 UTC 2004
mwilkinson
Mon Feb 9 18:16:23 EST 2004
Update of /home/repository/moby/moby-live/Perl/scripts/Services
In directory pub.open-bio.org:/tmp/cvs-serv1786/Services
Modified Files:
LocalServices.pm
Log Message:
added a get sequence neighbours service with default cutoff values (yes, I'm too lazy to write a service that allows secondary parameters when we haven't yet written any client code that can provide them) using SeqHound.
moby-live/Perl/scripts/Services LocalServices.pm,1.57,1.58
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/scripts/Services/LocalServices.pm,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -r1.57 -r1.58
--- /home/repository/moby/moby-live/Perl/scripts/Services/LocalServices.pm 2004/02/09 22:59:34 1.57
+++ /home/repository/moby/moby-live/Perl/scripts/Services/LocalServices.pm 2004/02/09 23:16:23 1.58
@@ -192,6 +192,41 @@
}
+sub getSHoundNeighboursFromGi { # 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 = SHoundNeighboursFromGi($identifier,0.01,'FALSE');
+ (($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