psicquic <- PSICQUIC()
# obtain the list of two dozen (or so) currently live
# PSICQUIC-compliant data providers
providers(psicquic)
# a minimal call: get all interactions with MAP3K3, of all types,
# from all providers. a data.frame is returned
tbl.0 <- interactions(psicquic, "MAP3K3", species="9606")
# build a contingency table, sort it, and see
# what kinds of interactions were returned, obtained
# by what detection methods.
# "-" is used when the provider does not specify a value.
# you will see a wide range of specificity, in detection method,
# interaction type, and number of interactions found.
xtab <- with(tbl.0, as.data.frame(
table(type, detectionMethod, provider)))
xtab <- subset(xtab, Freq > 0) # [order(xtab$Freq, decreasing=TRUE),]
xtab <- xtab[order(xtab$Freq, decreasing=TRUE),]
# what interactors were returned? the IDMapper class in this
# package converts many PSICQUIC providers' protein identifiers to
# entrez geneIDs and HUGO gene symbols, via remote calls to
# biomaRt:
idMapper <- IDMapper("9606")
tbl.0g <- addGeneInfo(idMapper, tbl.0)
with(tbl.0g, head(unique(c(A.name, B.name))))
# we see that MAP2K5 is the most frequently mentioned interacator:
xtab.sym <- with(tbl.0g, table(c(A.name, B.name)))
head(sort(xtab.sym, decreasing=TRUE))
# PSIQUIC uses well-devloped ontologies -- controlled vocabularies --
# which are currently best viewed in a web browser.
# we provide two convenience functions which will display these
# hierarchically defined vocabularies:
# interactionTypes()
# detectionMethods()
# NCBI curates taxonomy codes, such as "9606" for Homo sapiens.
# you can find these codes by using this method, which will
# drive your browser to the appropriate NCBI web page.
# speciesIds()
# use terms from these vocabularies to retrieve interaction
# information for these two proteins. note that both of
# these terms are mid-level in their respective hierarchies
# and will likely retrieve more specific nested terms
tbl.2 <- interactions(psicquic, id=c("MAP3K3", "MAP2K5"),
species="9606",
type="physical association",
detectionMethod="affinity chromatography technology")
# add gene IDs and symbols
tbl.2g <- addGeneInfo(idMapper, tbl.2)
# how many publications lie behind these interactions?
tbl.2g[, c("A.name", "B.name", "detectionMethod", "firstAuthor")]
# the package also provides a convenience method for submitting
# queries in native MIQL (Molecular Interaction Query Language).
# the language is defined here:
# http://code.google.com/p/psicquic/wiki/MiqlReference27
if("BioGrid" %in% providers(psicquic)){
tbl.3 <- rawQuery(psicquic, "BioGrid", "identifier:ALK AND species:9606")
# what publications?
table(tbl.3$V8)
}
Run the code above in your browser using DataLab