fetchNode: Query for an entity or list of entities from grinn internal...

Description Usage Arguments Value Author(s) Examples

View source: R/fetchNode.R

Description

from the list of keywords, query for entities from the grinn internal database. Quried results include entity information and relationship information. The keywords can be any of these node types: metabolite, protein, gene and pathway. Relationship information includes information of adjacent nodes, name and additional attributes of relationships.

Usage

1
fetchNode(txtInput, nodetype, searchField, exactMatch, returnAs, dbXref)

Arguments

txtInput

list of keywords, can be one of grinn id, name, synonym, database xref, inchi e.g. txtInput = list('name1', 'name2'). The type of keywords needs to be provided in the argument searchField, see searchField. Default is grinn id e.g. G371.

nodetype

string of entity type. It can be one of "metabolite","protein","gene","pathway".

searchField

string of keyword property to search for, see txtInput. It can be one of "grinn","name","synonym","xref","inchi". Default is "grinn". If searchField = "xref", the argument dbXref is required, see dbXref. If searchField = "name" or "synonym", the argument exactMatch is required, see exactMatch.

exactMatch

boolean value. The argument is required if searchField = "name" or "synonym", see searchField. Default is TRUE.

returnAs

string of output type. It can be one of "list","json", default is "list".

dbXref

string of database name. Specify the database name used for the txtInput when the argument searchField = "xref", see txtInput and searchField. It can be one of "grinn",chebi","kegg","pubchem","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 first neighborhoods. Return empty list if found nothing.

Author(s)

Kwanjeera W kwanich@ucdavis.edu

Examples

1
2
3
4
5
6
7
8
9
# Query metabolites by grinn ids
txtInput <- list('G371','G783')
result <- fetchNode(txtInput, nodetype="metabolite")
# Query genes by KEGG ids
txtInput <- list('hsa:4514','hsa:4537')
result <- fetchNode(txtInput, nodetype="gene", searchField="xref", dbXref="kegg", returnAs="list")
# Query proteins by names
txtInput <- list('14-3-3 protein beta/alpha','ARL14 effector protein-like','6-phosphogluconolactonase')
result <- fetchNode(txtInput, nodetype="protein", searchField="name", returnAs="list")

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