fetchGrinnNetwork: Compute an integrated network using information from Grinn...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/fetchGrinnNetwork.R

Description

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.

Usage

1
fetchGrinnNetwork(txtInput, from, to, filterSource, returnAs, dbXref)

Arguments

txtInput

vector of keywords containing keyword ids e.g. txtInput = list('id1', 'id2'). The keyword ids are from the specified database, see dbXref. Default is grinn id e.g. G371.

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 from or to = "pathway", see from and to. The argument value can be any of "SMPDB","KEGG","REACTOME" or combination of them e.g. list("KEGG","REACTOME").

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 txtInput. It can be one of "grinn","chebi","kegg","pubchem","inchi","hmdb","smpdb","reactome","uniprot","ensembl","entrezgene". Default is "grinn". If pubchem is used, it has to be pubchem SID (substance ID).

Value

list of nodes and edges. The list is with the following componens: edges and nodes. Return empty list if found nothing

Author(s)

Kwanjeera W kwanich@ucdavis.edu

See Also

http://js.cytoscape.org/

Examples

 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")

kwanjeeraw/grinn documentation built on May 20, 2019, 7:07 p.m.