NAME
Bio::BioVeL::Service::NeXMLMerger - merges phylogenetic data and metadata into NeXML
SYNOPSIS
use Bio::BioVeL::Service::NeXMLMerger;
# arguments can either be passed in from the command line argument array or as
# HTTP request parameters, e.g. from $QUERY_STRING
@ARGV = (
'-data' => $data, # a location, either local or as URL
'-trees' => $tree, # a location, either local or as URL
'-meta' => $meta, # a location, either local or as URL
'-charsets' => $sets, # a location, either local or as URL
'-dataformat' => 'nexus',
'-treeformat' => 'newick',
'-metaformat' => 'json',
'-charsetformat' => 'nexus',
);
my $merger = Bio::BioVeL::Service::NeXMLMerger->new;
my $nexml = $merger->response_body;
DESCRIPTION
This package merges phylogenetic data and metadata to produce 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 NeXML response body by reading the input data and metadata objects and folding them into a single Bio::Phylo::Project object that is serialized to NeXML.