This tutorial explains how to access to the second **phenomeapi** web service (PHIS system information). For this second web service, the available functions are: * getAnnotations() * getEnvironmentData() * getEvents() * getExperiments2() * getInfrastructures() * getMethods2() * getPhenotypeData() * getProjects2() * getScientificObjects() * getSensors() * getSpecies() * getTraits() * getUnits() * getVariables2() * getVectors()
  library(phisWSClientR)

Creation of an identifier

Ask permission to request to the web service:

  # If you want to access to a private web service, you have to insert the address of the WS and the port
  connect(apiID="ws_private", url = "www.opensilex.org/openSilexAPI/rest/")

aToken will be used in all the requests to the web service. This is your identification and grants the access to some data according to your login information.

  aToken <- getToken("guestphis@supagro.inra.fr","guestphis")

Fetch informations about elements in the web service

Projects

  getProjects2(aToken$data, uri="http://www.opensilex.org/demo/PHENOME-FPPN")

Experiments

  getExperiments2(aToken$data, uri="http://www.opensilex.org/demo/DIA2017-1")

Scientific Object

  getScientificObjects(aToken$data, uri="http://www.opensilex.org/demo/2018/o18000076")

Infrastructures

  getInfrastructures(aToken$data, uri="https://emphasis.plant-phenotyping.eu")

Variables

  getVariables2(aToken$data, uri="http://www.opensilex.org/demo/id/variables/v010")

Traits

  getTraits(aToken$data, uri="http://www.opensilex.org/demo/id/traits/t010")

Methods

  getMethods2(aToken$data, uri="http://www.opensilex.org/demo/id/methods/m010")

Units

  getUnits(aToken$data, uri="http://www.opensilex.org/demo/id/units/u007")

Species

  getSpecies(aToken$data, uri="http://www.opensilex.org/id/species/helianthusannuus", language = "en")

Sensors

  getSensors(aToken$data, uri="http://www.opensilex.org/demo/2018/s18001")

Vectors

  getVectors(aToken$data, serialNumber = "01BD1DD71500001")

Events

# Where to find the "type" URL ?
# Where is the ontology access ?
  getEvents(aToken$data, type = "http://www.opensilex.org/vocabulary/oeev#Fertilization", pageSize=10)

Annotations

# Where to find the "type" URL ?
# Where is the ontology access ?
  getAnnotations(aToken$data, comment = "Ustilago maydis infection" , pageSize=10)

Fetch Data from the webservice

Environment data

  getEnvironmentData(aToken$data, variable = "http://www.opensilex.org/demo/id/variables/v010", pageSize=50)

Phenotypic data

  head(getPhenotypeData(aToken$data, 
                        variable = "http://www.opensilex.org/demo/id/variables/v001", 
                        pageSize=10)$data)

Session info

  sessionInfo()

References

  1. R Development Core Team (2018). R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. ISBN 3-900051-07-0, URL http://www.R-project.org.


niio972/opensilex-ws-client-r documentation built on Nov. 4, 2019, 10:06 p.m.