[MOBY-guts] biomoby commit
Mark Wilkinson
mwilkinson at pub.open-bio.org
Sun Jan 18 04:00:25 UTC 2004
mwilkinson
Sat Jan 17 23:00:25 EST 2004
Update of /home/repository/moby/moby-live/Perl/scripts/Services
In directory pub.open-bio.org:/tmp/cvs-serv3491/Services
Modified Files:
LocalServices.pm
Log Message:
removing a service that I just re-wrote to give better output
moby-live/Perl/scripts/Services LocalServices.pm,1.53,1.54
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/scripts/Services/LocalServices.pm,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -r1.53 -r1.54
--- /home/repository/moby/moby-live/Perl/scripts/Services/LocalServices.pm 2004/01/18 03:54:52 1.53
+++ /home/repository/moby/moby-live/Perl/scripts/Services/LocalServices.pm 2004/01/18 04:00:25 1.54
@@ -666,81 +666,6 @@
#################################################
#################################################
-sub getDragonMutantImages {
-
- my ($self, $data) = @_;
-
-# prepare myself
- my $OS = MOBY::Client::OntologyServer->new;
- my ($s, $m, $nsAllele) = $OS->namespaceExists(term => "DragonDB_Allele");
-
- unless ($nsAllele){ # unless we could get the known namespace LSID's we should bail because somethign is very very wrong!
- print STDERR "the namespace DragonDB_Allele does not exist in the MOBY namespace ontology\n";
- return SOAP::Data->type('base64' => responseHeader() . responseFooter()); # base 64 encode it (optional)
- }
-# make the database connection once
- my $db = Ace->connect(-host => 'bioinfo.usask.ca',
- -port => 23100);
-###################################
-
-# now start retrieving the input data
- my @input_nodes = genericServiceInputParser($data);
- my @inputs;
-
-# Start iterating through the queries
- my $response;
- foreach my $input(@input_nodes){
- my ($articleType, $qID, $node) = @{$input};
- unless (($articleType == SIMPLE) && (defined($input))){ # we only accept simple inputs to this service
- $response .= collectionResponse([], "", $qID) ; # send back a blank response for this queryID
- next;
- }
- my $namespace_LSID = getSimpleArticleNamespaceURI($node); # get the LSID of the namespace for this input object
- unless ($namespace_LSID eq $nsAllele){ # validate the namespace
- $response .= collectionResponse([], "", $qID); # because we have to send one response per input, send a blank if bad namespace
- next;
- }
-
- my ($Allele)= getSimpleArticleIDs($namespace_LSID, [$node]); # get the ID within this namespace
- unless (defined $Allele){ # send a blank if we failed to get an id,
- $response .= collectionResponse([], "", $qID); # because we have to send one response per input
- next;
- }
-# Prepare query on DragonDB with that allele name
-
-
-# my $q= qq{select Gif from Gif in object("Allele","$identifier")};
-# my $db = Ace->connect(-host => 'bioinfo.usask.ca', -port => 23100);
-# my @res = $db->aql($q);
-#
-
-
- my $query = qq(select Gif from Gif in object("Allele","$Allele") -> Phenotype_picture -> Pick_me_to_call[2]);
-# print STDERR "QUERY TO DRAGONDB WAS $query\n";
- my @jpgnames= $db->aql($query);
- # I really need to learn AQL better so that I can also retrieve the
- # Locus as a Cross-reference, and the Sequence as a cross-reference!
- my @simples;
- foreach my $jpg (@jpgnames){
- $jpg = $jpg->[0];
- $jpg =~ s/([^\w\-\.\@])/$1 eq " "?"+":sprintf("%%%2.2x",ord($1))/eg; # URL Encode the image filename
- $jpg = "http://antirrhinum.net/ace/images/DragonDB/external/".$jpg; # make the URL
- my $ua = LWP::UserAgent->new;
- my $req = HTTP::Request->new(GET => $jpg); # get the image
- my $res = $ua->request($req);
-
- # Check the outcome of the response
- if ($res->is_success) { # if successful, then base64 encide the data
- my $image_data = encode_base64($res->content); # and create the simple image object
- push @simples, "<moby:b64_encoded_jpeg namespace='$namespace_LSID' id='$Allele'>$image_data</moby:b64_encoded_jpeg>"; # push it onto the collection list
- }
- }
- $response .= collectionResponse(\@simples, "", $qID); # after all images have been collected, create the collection
- }
- $response = responseHeader() . $response . responseFooter(); # now wrap the collection(s) with the appropriate headers etc
- my $SOAPResponse = SOAP::Data->type('base64' => $response);
- return $SOAPResponse # and return them.
-}
sub getDragonSimpleAnnotatedImages{
my ($caller, $data) = @_;
More information about the MOBY-guts
mailing list