An example client showing how to connect to biovel services from within R.
Here we show how a RESTful webservice can be invoked from within R, using the package RCurl
.
This small example uses the NeXMLExtractor REST endpoint published in the Biodiversity catalogue to extract sequence data from a NeXML file. The data is returned in FASTA format, and a simple neighbor-joining tree is constructed from the data and subsequently plotted.
An installation of R
and the packages RCurl
and phangorn
.
From within R, execute the script 'client.R':
source('client.R')