[MOBY-guts] biomoby commit
Mark Wilkinson
mwilkinson at pub.open-bio.org
Tue Dec 16 20:46:40 UTC 2003
mwilkinson
Tue Dec 16 15:46:40 EST 2003
Update of /home/repository/moby/moby-live/Perl/scripts/Services
In directory pub.open-bio.org:/tmp/cvs-serv665/scripts/Services
Modified Files:
LocalServices.pm
Log Message:
corrected the SeqHound call for EMBL accession numbers Added a new service that wraps the SeqHound SHoundGetTaxParent function to retrieve the taxonomic parents of a given taxon id.
moby-live/Perl/scripts/Services LocalServices.pm,1.48,1.49
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/scripts/Services/LocalServices.pm,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- /home/repository/moby/moby-live/Perl/scripts/Services/LocalServices.pm 2003/12/11 22:30:53 1.48
+++ /home/repository/moby/moby-live/Perl/scripts/Services/LocalServices.pm 2003/12/16 20:46:40 1.49
@@ -17,15 +17,31 @@
use MIME::Base64;
use XML::DOM;
use MOBY::Client::OntologyServer;
-use MOBY::CommonSubs qw(:all); # this provides the
-# subroutines:
-#getSimpleArticleIDs
-#getSimpleArticleNamespaceURI
-#simpleResponse
-#responseHeader
-#responseFooter
-#getInputArticles
-#getNodeContentWithArticle
+use MOBY::CommonSubs qw(:all); # this provides the following vars and functions
+ #getSimpleArticleIDs
+ #getSimpleArticleNamespaceURI
+ #simpleResponse
+ #responseHeader
+ #responseFooter
+ #getInputArticles
+ #getInputs
+ #getInputID
+ #getArticles
+ #getCollectedSimples
+ #getNodeContentWithArticle
+ #extractRawContent
+ #collectionResponse
+ #validateNamespaces
+ #validateThisNamespace
+ #isSimpleArticle
+ #isCollectionArticle
+ #extractResponseArticles
+ #getResponseArticles
+ #getCrossReferences
+ #genericServiceInputParser
+ #COLLECTION
+ #SIMPLE
+
my $debug = 1;
use vars qw(@ISA);
@@ -103,7 +119,7 @@
return SOAP::Data->type('base64' => (responseHeader("illuminae.com") . $MOBY_RESPONSE . responseFooter));
}
-sub getTaxParent { # DOES NOT WORK - SHound call doesn't exist
+sub getTaxParent { # now it works.
my ($caller, $data) = @_;
my $MOBY_RESPONSE;
my (@inputs)= genericServiceInputParser($data); # ([SIMPLE, $queryID, $simple],...)
@@ -327,14 +343,6 @@
# ===============================================
# = Genbank Retrieval Scripts =
# = =
-# = Note: The two VirtualSequenceRetrieve's =
-# = and two SequenceRetrieves below could=
-# = have been registered as two services =
-# = instead of four, by simply =
-# = registering each under two different =
-# = namespaces (Acc and gi) instead of =
-# = having a single service for each =
-# = namespace =
# ===============================================
@@ -369,7 +377,7 @@
my $gb = SHoundGetGenBankff($identifier);
(($MOBY_RESPONSE .= simpleResponse("", "No_genbank_record_found", $qID)) && next) unless $gb;
$MOBY_RESPONSE .= simpleResponse("<genbank-flatfile namespace='NCBI_gi' id='$identifier'><![CDATA[$gb]]></genbank-flatfile>", "", $qID);
- } elsif ($ns eq $validNS{'NCBI_Acc'}){ # THIS ONE DOESN'T WORK YET????
+ } elsif (($ns eq $validNS{'NCBI_Acc'}) || ($ns eq $validNS{'EMBL'})){
my $gi = SHoundFindAcc($identifier);
(($MOBY_RESPONSE .= simpleResponse("", "No_gi_found_for_accession", $qID)) && next) unless $gi;
my $gb = SHoundGetGenBankff($gi);
@@ -458,7 +466,7 @@
$tempresponse .="</CrossReference>\n<Integer namespace='' id='' articleName='Length'>".($SEQ->length)."</Integer>
</VirtualSequence>";
$MOBY_RESPONSE .= simpleResponse($tempresponse, "", $qID);
- } elsif ($ns eq $validNS{'NCBI_Acc'}){ # THIS ONE DOESN'T WORK YET????
+ } elsif (($ns eq $validNS{'NCBI_Acc'}) || ($ns eq $validNS{'EMBL'})){
my $gi = SHoundFindAcc($identifier);
(($MOBY_RESPONSE .= simpleResponse("", "No_gi_found_for_accession", $qID)) && next) unless $gi;
my ($SEQ, $length, $seq) = _makeSeqObj($gi);
@@ -541,7 +549,7 @@
<String namespace='' id='' articleName='SequenceString'>".($SEQ->seq)."</String>
</$objType>";
$MOBY_RESPONSE .= simpleResponse($tempresponse, "", $qID);
- } elsif ($ns eq $validNS{'NCBI_Acc'}){ # THIS ONE DOESN'T WORK YET????
+ } elsif (($ns eq $validNS{'NCBI_Acc'}) || ($ns eq $validNS{'EMBL'})){
my $gi = SHoundFindAcc($identifier);
(($MOBY_RESPONSE .= simpleResponse("", "No_gi_found_for_accession", $qID)) && next) unless $gi;
my ($SEQ, $length, $seq) = _makeSeqObj($gi);
@@ -617,7 +625,7 @@
my $gb = SHoundGetFasta($identifier);
(($MOBY_RESPONSE .= simpleResponse("", "No_genbank_record_found", $qID)) && next) unless $gb;
$MOBY_RESPONSE .= simpleResponse("<FASTA namespace='NCBI_gi' id='$identifier'><![CDATA[$gb]]></FASTA>", "", $qID);
- } elsif ($ns eq $validNS{'NCBI_Acc'}){ # THIS ONE DOESN'T WORK YET????
+ } elsif (($ns eq $validNS{'NCBI_Acc'}) || ($ns eq $validNS{'EMBL'})){
my $gi = SHoundFindAcc($identifier);
(($MOBY_RESPONSE .= simpleResponse("", "No_gi_found_for_accession", $qID)) && next) unless $gi;
my $gb = SHoundGetFasta($gi);
More information about the MOBY-guts
mailing list