Description Usage Arguments Value Author(s) See Also Examples
View source: R/fetchGrinnNetwork.R
from the list of keywords, build an integrated network (grinn network) by connecting these keywords to a specified node type. The keywords can be any of these node types: metabolite, protein, gene and pathway. The Grinn internal database contains the networks of the following types that can be quried: metabolite-protein, metabolite-protein-gene, metabolite-pathway, protein-gene, protein-pathway and gene-pathway.
1 | fetchGrinnNetwork(txtInput, from, to, filterSource, returnAs, dbXref)
|
txtInput |
vector of keywords containing keyword ids e.g. txtInput = list('id1', 'id2').
The keyword ids are from the specified database, see |
from |
string of start node. It can be one of "metabolite","protein","gene","pathway". |
to |
string of end node. It can be one of "metabolite","protein","gene","pathway". |
filterSource |
string or list of pathway databases. The argument is required, if |
returnAs |
string of output type. Specify the type of the returned network. It can be one of "tab","json","cytoscape", default is "tab". "cytoscape" is the format used in Cytoscape.js |
dbXref |
string of database name. Specify the database name used for the txtInput ids, see |
list of nodes and edges. The list is with the following componens: edges and nodes. Return empty list if found nothing
Kwanjeera W kwanich@ucdavis.edu
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # Query genes by ENSEMBL ids and build a grinn network of gene-protein-metabolite
txtInput <- list('ENSG00000140459','ENSG00000143811','ENSG00000104524')
result <- fetchGrinnNetwork(txtInput, from="gene", to="metabolite", returnAs="tab", dbXref="ensembl")
library(igraph)
plot(graph.data.frame(result$edges[,1:2], directed=FALSE))
# Query metabolites by grinn ids and build a grinn network of metabolite-pathway
txtInput <- c('G371','G783')
result <- fetchGrinnNetwork(txtInput, from="metabolite", to="pathway", returnAs="json")
# Query metabolites by grinn ids and build a network of metabolite-pathway using information from KEGG and REACTOME
txtInput <- c('G371','G783')
result <- fetchGrinnNetwork(txtInput, from="metabolite", to="pathway", filterSource=list("KEGG","REACTOME"), returnAs="tab")
# Query proteins by uniprot ids and build a network of protein-pathway using information from SMPDB
txtInput <- list('P05108','Q53H96','P18463')
result <- fetchGrinnNetwork(txtInput, from="protein", to="pathway", filterSource="SMPDB", returnAs="cytoscape", dbXref="uniprot")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.