The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

WebService::FuncNet::Predictor - Interface to the CATH FuncNet webservice

SYNOPSIS

    use WebService::FuncNet::Predictor;

    $ws = WebService::FuncNet::Predictor->new(
                    wsdl    => 'http://funcnet.eu/soap/Geco.wsdl',
                    port    => 'GecoPort',
                    binding => 'GecoBinding',
                    service => 'GecoService',
                 );
    
    @proteins1 = qw( A3EXL0 Q8NFN7 O75865 );
    @proteins2 = qw( Q5SR05 Q9H8H3 P22676 );
    
    $response  = $ws->score_pairwise_relations( \@proteins1, \@protein2 );

    foreach $result ( @{ $response->results } ) {
        print join( ", ",
                $result->protein_1,      # Q9H8H3
                $result->protein_2,      # O75865
                $result->p_value,        # 0.445814
                $result->raw_score       # 0
            ), "\n";
    }

This module provides a simple API to the FuncNet predictor services and the documentation provided here refers to the usage and implementation of the API rather than the details of the actual FuncNet WebServices. For more information on FuncNet, it is best to visit the project homepage at:

   http://funcnet.eu

ACCESSORS

wsdl

Provides access to the underlying XML::Compile::WSDL11 object used to communicate with the CATH FuncNet WebService. This can be coerced from the URI of a WSDL either as 'uri' or URI->new( 'uri' ).

By default this is created from the URL:

  http://funcnet.eu/soap/Geco.wsdl

but any FuncNet predictor URL can be used here; see http://funcnet.eu/wsdls/

Coercions:

  $self->wsdl( 'uri' )
  $self->wsdl( URI->('uri') )
  $self->wsdl( XML::Compile::WSDL11->new() )

ns_base

Read-only access to the namespace string, e.g.

  http://funcnet.eu/FuncNet_1_0/

port

Read-only access to the port string, e.g.

    GecoPort

binding

Read-only access to the binding string, e.g.

    GecoBinding

service

Read-only access to the service string, e.g.

    GecoService

OPERATIONS

score_pairwise_relations( \@proteins1, \@proteins2 )

Provides a pairwise comparison of the relationships between two sets of proteins.

  $response = $ws->score_pairwise_relations( [ 'A3EXL0', 'Q8NFN7' ], [ 'Q5SR05', 'Q9H8H3' ] )

See WebService::FuncNet::Predictor::Operation::ScorePairwiseRelations

PARAMS

\@proteins

ARRAY ref containing list of protein identifiers

RETURNS

WebService::FuncNet::Predictor::Operation::ScorePairwiseRelations::Response

CLASS METHODS

These are used to help create the object and aren't really intended for public consumption. I'm including them in the docs but I'm not exporting them or promising that they won't change in the future.

wsdl_from_uri( $wsdl_uri )

Class method that downloads a WSDL from a remote URI then creates and returns a XML::Compile::WSDL11 object

PARAMS

$wsdl_uri

String or URI object pointing to the location of the external FuncNet WSDL

RETURNS

XML::Compile::WSDL11

wsdl_from_filename( $wsdl_filename )

Class method that creates and returns a XML::Compile::WSDL11 object from a local file

PARAMS

$wsdl_filename

Filename of the WSDL

RETURNS

XML::Compile::WSDL11

download_wsdl_to_tmp_file( $wsdl_uri )

Class method that downloads an external WSDL and saves the content in a temporary file.

PARAMS

$wsdl_uri

String or URI object pointing to the location of the external FuncNet WSDL

RETURNS

filename

temporary file containing the WSDL content

DESCRIPTION

The XML::Compile::WSDL11 object requires a copy of the WSDL on the local filesystem. If the object is initialised as

  WebServices::FuncNet::Predictor->new( wsdl => "uri" )               # default
  WebServices::FuncNet::Predictor->new( wsdl => URI->new( "uri" ) )

then the process of coercing the string or URI to XML::Compile::WSDL11 object will involve downloading the WSDL to a temporary file. It would be nice it this had the option of being cached.

TODO

- Manage local cache of WSDL to avoid unneccessary downloading at startup

- Add more tests (especially failing test)

- Wrap around LWP and XML::Compile exceptions

DEPENDENCIES

Moose, XML::Compile::WSDL11, URI, LWP, File::Temp, Readonly

BUGS AND LIMITATIONS

No bugs have been reported.

Please report any bugs or feature requests to bug-webservice-cath-funcnet@rt.cpan.org, or through the web interface at http://rt.cpan.org.

AUTHOR

Ian Sillitoe <sillitoe@biochem.ucl.ac.uk>

LICENCE AND COPYRIGHT

Copyright (c) 2008, Ian Sillitoe <sillitoe@biochem.ucl.ac.uk>. All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.

REVISION INFO

  Revision:      $Rev: 141 $
  Last editor:   $Author: isillitoe $
  Last updated:  $Date: 2010-05-26 14:11:41 +0100 (Wed, 26 May 2010) $

The latest source code for this project can be checked out from:

  https://funcnet.svn.sf.net/svnroot/funcnet/trunk