[Bio] / FigWebServices / webservices_ACH.cgi Repository:
ViewVC logotype

Annotation of /FigWebServices/webservices_ACH.cgi

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (view) (download)

1 : disz 1.1 #__perl__
2 :    
3 :     use strict;
4 :     use Carp;
5 :     use CGI::Carp qw(fatalsToBrowser); # this makes debugging a lot easier by throwing errors out to the browser
6 :     use SOAP::Lite;
7 :     use SOAP::Transport::HTTP;
8 :    
9 :     SOAP::Transport::HTTP::CGI
10 :     -> dispatch_to('ACHWebServices')
11 :     -> handle;
12 :    
13 :    
14 :     package ACHWebServices;
15 :    
16 :     use FIG;
17 :     use AnnoClearinghouse;
18 :     use Data::Dumper;
19 :    
20 :     =begin WSDL
21 :     _IN Gene_ID $string
22 :     _IN ID_type $string
23 :     _RETURN @string
24 :     _DOC Given a protein ID from any source we know about, returns a list of ID's of the requested type. If no type is given, returns all corresponding iD's
25 :     =cut
26 :     sub get_corresponding_ids {
27 :     my ($class, $id, $type) = @_;
28 :    
29 :     my $fig = new FIG;
30 :     #change the below to use a CONFIG variable
31 :     print STDERR "ACH $id, $type\n";
32 :     my $ach = new AnnoClearinghouse("/vol/clearinghouse/current/",
33 :     "/vol/clearinghouse/contrib/",
34 :     0,
35 :     my $dbf = $fig->db_handle);
36 :    
37 :     my @ids = $ach->get_corresponding_ids( $id , $type);
38 :     print STDERR $id, " ", $type, " ", scalar @ids, "\n";
39 :     my @return;
40 :     foreach my $p ( @ids ){
41 :     push @return, join( "\t" , @$p);
42 :     }
43 :    
44 :     return @return;
45 :     }

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3