Description Usage Arguments Value Author(s) References See Also Examples
from the list of metabolites, find and connect these metabolites to three type of nodes including Protein, Gene and Pathway.
1 | pairToNode(txtInput, organism, label=c("Protein","Gene","Pathway"), returnAs="json", searchBy="grinn")
|
txtInput |
string containing metabolite ids. Metabolite ids are from the specified database, see |
organism |
string of species in the following format: organism = "'species'" |
label |
character vector of node types to connect to metabolites, default is all three node types: c("Protein","Gene","Pathway") |
returnAs |
string of output type. Specify the type of the returned network. It can be "all", "json" or "cytoscape", but default is "json". "cytoscape" is the format used in Cytoscape.js |
searchBy |
string of database name. Specify the database of which the ids used as the txtInput, see |
list of nodes and edges encapsulated in json format. Return empty list if found nothing.
Kwanjeera W kwanich@ucdavis.edu
Modify the output generation for Cytoscape.js from https://github.com/cytoscape/r-cytoscape.js/blob/master/cytoscapeJsSimpleNetwork.R
Cytoscape.js, Network library for analysis and visualisation http://js.cytoscape.org/
1 2 3 4 5 6 7 8 | # Query metabolites by PubChem ids and connect to Protein, Gene and Pathway
txtInput <- "['PubChem:3326','PubChem:3436','PubChem:7656']"
organism <- "'Homo sapiens'"
result <- pairToNode(txtInput, organism, returnAs="all", searchBy="PubChem")
# Query metabolites by grinn ids and and connect to Gene and Pathway
txtInput <- "['C00024','C00136','C05269']"
organism <- "'Homo sapiens'"
result <- pairToNode(txtInput, organism, label=c("Gene","Pathway"), returnAs="all", searchBy="grinn")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.