NAME
Webservice::InterMine - modules for interacting with InterMine datawarehouse webservices
SYNOPSIS
use Webservice::InterMine;
my $service = Webservice::InterMine->new_service($url, $user, $pass);
my $template = $service->template($name);
my $results = $template->results_with(valueA => 'x', valueB => 'y');
OR
use Webservice::InterMine 'www.flymine.org', $user, $pass;
my $query = Webservice::InterMine->new_query;
$query->add_view(@views);
$query->add_constraint(
path => $path,
op => $op,
value => $value,
);
my $results = $query->results;
DESCRIPTION
This distribution is the client interface to any implementation of the InterMine Datawarehousing WebService (www.intermine.org). Primarily used for biological genomic databases, the webservice allows the user to easily write and execute structured queries.
This module allows you to interact with one or more webservices by providing a url to an InterMine implementation.
Usage
You can call use Webservice::InterMine
without any parameters, which simply means you need to either specify the webservice url on every call, or call the methods on a service directly.
If you call use Webservice::InterMine $url
, a default service will be set, meaning method calls will not require the webservice url. Unless you are intending to access multiple services, the latter form is recommended.
METHODS
new_query( [\@service_args], [%query_args] )
returns a new query object for you to fill in with constraints before being run to get its results. If you pass a url, it constructs a query for the specified webservice.
Please see Webservice::InterMine::Query
load_query([\@service_args], source_file|source_string => $source, %opts )
Returns a query object based on xml you have previously saved, either as a string or as a file. For a file pass:
load_query(source_file => $file);
For a string:
load_query(source_string => $string);
If you want a specific service, call it thus:
load_query(service_args => [$name, $user, $pass], source_string => $string);
OR:
load_query([$name, $user, $pass], source_string => $string);
Please see Webservice::InterMine::Query::Saved
template( $name, [\@service_args], [%opts] )
returns the named template (if it exists - if not it returns undef). If you pass a url, it returns the named template from the specified webservice.
Please see Webservice::InterMine::Query::Template
saved_query( $name, [$url] ) NOT IMPLEMENTED YET
returns the named saved_query (if it exists - if not it returns undef). If you pass a url, it returns the named query from the specified webservice.
This method requires you to have provided a username and password to the webservice for authentication.
Please see Webservice::InterMine::Query::Saved
get_service( [$url, $user, $pass] )
returns a webservice object, which is used to construct queries and fetch templates and saved queries. If a url is passed, the webservice for that url is returned, otherwise the service for the url given to use
is returned.
Please note: user and password based authentication has not yet been implemented.
Please see: Webservice::InterMine::Service
SEE ALSO
Webservice::InterMine::Cookbook for guide on how to use these modules.
AUTHOR
Alex Kalderimis <dev@intermine.org>
BUGS
Please report any bugs or feature requests to dev@intermine.org
.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Webservice::InterMine
You can also look for information at:
InterMine
Documentation
COPYRIGHT AND LICENSE
Copyright 2006 - 2011 FlyMine, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.