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

View of /Babel/webservices_ACH.cgi

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (download) (annotate)
Tue Dec 1 15:22:43 2009 UTC (10 years, 6 months ago) by wilke
Branch: MAIN
CVS Tags: mgrast_dev_08112011, mgrast_dev_08022011, mgrast_dev_03052011, mgrast_dev_05262011, mgrast_dev_04082011, mgrast_dev_12152011, mgrast_dev_06072011, mgrast_dev_10262011, mgrast_dev_02212011, mgrast_release_3_0, mgrast_dev_03252011, mgrast_release_3_0_4, mgrast_release_3_0_2, mgrast_release_3_0_3, mgrast_release_3_0_1, mgrast_dev_03312011, mgrast_release_3_1_2, mgrast_release_3_1_1, mgrast_release_3_1_0, mgrast_dev_04132011, mgrast_dev_04012011, mgrast_dev_04052011, mgrast_dev_02222011
initial babel checkin

#__perl__

use strict;
use Carp;
use CGI::Carp qw(fatalsToBrowser); # this makes debugging a lot easier by throwing errors out to the browser
use SOAP::Lite;
use SOAP::Transport::HTTP;

SOAP::Transport::HTTP::CGI   
-> dispatch_to('ACHWebServices')     
-> handle;


package ACHWebServices;

use FIG;
use AnnoClearinghouse;
use Data::Dumper;

=begin WSDL
_IN Gene_ID  $string 
_IN ID_type  $string 
_RETURN @string
_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
=cut
sub get_corresponding_ids {
	my ($class, $id, $type) = @_;

	my $fig = new FIG;

	my $ach = new AnnoClearinghouse( $FIG_Config::clearinghouse_data ,
					 $FIG_Config::clearinghouse_contrib , 
					 0,
					 my $dbf = $fig->db_handle);
	
	my @ids = $ach->get_corresponding_ids( $id , $type);

	return @ids;
}

=begin WSDL
_IN ID  $string  
_RETURN $string
_DOC Given a protein ID from any source we know about, returns the organism name for this ID
=cut

sub get_organism_name{
    my ($class , $id) = @_;

    my $fig = new FIG;

    my $ach = new AnnoClearinghouse( $FIG_Config::clearinghouse_data ,
				     $FIG_Config::clearinghouse_contrib , 
				     0,
				     my $dbf = $fig->db_handle);
	
    return  $ach->get_organism_name( $id );
}

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3