InterMine > Webservice-InterMine-1.0405 > Webservice::InterMine::Role::Showable

Download:
Webservice-InterMine-1.0405.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  1
View/Report Bugs
Source  

NAME ^

Webservice::InterMine::Role::Showable - behaviour for queries that can print their results out

SYNOPSIS ^

    use Webservice::InterMine;
    my $service  = Webservice::InterMine->new_service('www.flymine.org/query');

    # Print out a readable table of all results
    $query = $service->new_query(class => 'Gene');
    $query->select('*', 'pathways.*')
          ->where(symbol => [qw/bib eve h zen/])
          ->show();

    # Just print the first 20 rows
    $query = $service->new_query(class => 'Gene');
    $query->select('*', 'pathways.*')
          ->show_first(20);

    # Print the results out to a file.
    $query->print_results(columnheaders => 1, to 'some/file.tsv');

DESCRIPTION ^

Print out the results to either the screen (by default) or any arbitrary file or filehandle. These methods are used by queries and lists to diplay their contents for inpection and storage.

show( [$fh, $no_of_rows] )

Print out the results to standard out (or an optional filehandle) in a easy to read summary table format, with an informative header, column headers in the form of the views, and the results aligned in columns.

show_first($no_of_rows)

Prints out the first $no_of_rows rows, or 10 rows if no argument was given in the same format as show.

print_results( %options )

returns the results from a query in the result format specified.

The following options are available:

SEE ALSO ^

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::Role::Showable

You can also look for information at:

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.

syntax highlighting: