Tuesday 23 August 2011

GoBioSpace goes R

With the grateful help of Duncan Temple Lang (SSOAP package on omegahat, http://www.omegahat.org/SSOAP/ ) I could integrate GobioSpace with R.

Here is some R example code:
library(SSOAP)
gobi.url = "http://gmd.mpimp-golm.mpg.de/webservices/wsGoBioSpace.asmx?WSDL"
gobi.wsdl = processWSDL(gobi.url, port = 1)
gobi.iface = genSOAPClientInterface(, gobi.wsdl)

names(gobi.iface@functions)

The fnext statement creates as session for searching the Depositors "Human Metabolome Database" (id=3), "KNApSAcK v1.200.03" (id=6) and "Metabolome.JP" (id=8) and using the Adducts "Protonation    [M + H+]+" (id = 2) and "KaliumAdduct    [M + K+]+" (id=3). Here you can find the full list of Depositors and Adducts!

session = gobi.iface@functions$CreateSession(DepositorIds = c(3, 6, 8), AdductIds = c(2L, 3L))
sm = gobi.iface@functions$SearchMass12C(SessionID = session, mass = 579.1705, tolerance = 0.001)

names(sm)

sapply(sm, slot, "fID")

synonyms = gobi.iface@functions$GetSynonyms(SessionID = session, FormulaID = 21169)

Your feedback is highly appreciated!

cheers,
Jan

No comments:

Post a Comment