Rutger Vos
and 1 contributors

NAME

Bio::BioVeL::Service::NeXMLExtractor - extracts and converts data from a NeXML document

SYNOPSIS

 use Bio::BioVeL::Service::NeXMLExtractor;

 # arguments can either be passed in from the command line argument array or as 
 # HTTP request parameters, e.g. from $QUERY_STRING
 @ARGV = (
     '-nexml'      => $nexml,
     '-object'     => 'Trees',
     '-treeformat' => 'newick',
     '-dataformat' => 'nexus'
 );

 my $extractor = Bio::BioVeL::Service::NeXMLExtractor->new;
 my $data = $extractor->response_body;

DESCRIPTION

This package extracts phylogenetic data from a NeXML document. Although it can be used inside scripts that receive command line arguments, it is intended to be used as a RESTful web service that clients can be written against, e.g. in http://taverna.org.uk for inclusion in http://biovel.eu workflows.

METHODS

new

The constructor typically receives no arguments.

response_header

Returns the MIME-type HTTP header. Note: at present this isn't really used, it needs refactoring to play nice with the way mod_perl constructs response headers. This would probably be done by only returning the MIME-type itself, which is then included in the header by the superclass.

response_body

Generates the requested response. It does this by reading a NeXML document and collecting objects of the type specified by the object() property (i.e. 'Matrices', 'Trees' or 'Taxa'). It then serializes these to the requested format.