convertToGrinnID: Convert other database IDs to Neo4j internal IDs and grinn...

Description Usage Arguments Value Author(s) Examples

View source: R/convertToGrinnID.R

Description

Convert the list of ids to grinn IDs grinn IDs are recommended to be used in several functions including combineNetwork, fetchGrinnCorrNetwork, fetchGrinnModuNetwork, fetchGrinnDiffCorrNetwork, fetchCorrGrinnNetwork, fetchModuGrinnNetwork, fetchDiffCorrGrinnNetwork.

Usage

1
convertToGrinnID(txtInput, nodetype, dbXref)

Arguments

txtInput

list of keywords containing ids e.g. txtInput = list('id1', 'id2'). The ids are from a database, see dbXref.

nodetype

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

dbXref

string of database name. Specify the database name used for the txtInput, see txtInput. It can be one of "chebi","kegg","pubchem","inchi","hmdb","smpdb","reactome","uniprot","ensembl","entrezgene".

Value

data frame of ids. Return empty list if found nothing.

Author(s)

Kwanjeera W kwanich@ucdavis.edu

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# Convert genes from ENSEMBL ids to grinn ids
txtInput <- list('ENSG00000140459','ENSG00000143811','ENSG00000104524')
result <- convertToGrinnID(txtInput, nodetype="gene", dbXref="ensembl")
# Convert metabolites from chebi ids to Grinn ids
txtInput <- c(371,783)
result <- convertToGrinnID(txtInput, nodetype="metabolite", dbXref="chebi")
# Convert metabolites from kegg ids to Grinn ids, read input from csv or txt file
library(grinn)
data(keggids)
result <- convertToGrinnID(unlist(keggids), nodetype="metabolite", dbXref="kegg")

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