convertId: Convert ids

Description Usage Arguments Details Value Author(s) Examples

Description

convert input entities to internal neo4j ids and grinn ids.

Usage

1
convertId(x, nodetype, searchby, exactmatch, returnas)

Arguments

x

a character vector or data frame of input entities, see details. It can be the value of any node property key e.g. txtinput = c('pubchemId1', 'pubchemId2'), see also searchby.

nodetype

a string specifying the type of a query node. It can be one of compound, protein, gene, pathway, rna, dna, phenotype.

searchby

a string specifying a node property key used for the query. It can be one of neo4jid, grinnid, name, synonyms, xref (default).

exactmatch

a logical value. If TRUE (default), match exactly, case-sensitive and data type-sensitive.

returnas

a string specifying output type. It can be one of dataframe, list, json. Default is dataframe.

Details

If x is a character vector, the results include the input entities, neo4j ids and grinn ids.

x can be a data frame containing other information e.g. stat values. First column must be the input entities for the mapping. The results will include the input entities, neo4j ids, grinn ids and the rest of the input information.

Original input will be returned for unmapped entities.

The database uses two id systems. The neo4j id is a numeric, internal id automatically generated by the database system. The grinn id (gid) is an id system of Grinn database that uses main ids of standard resources i.e. ENSEMBL for genes (e.g.ENSG00000139618), UniProt for proteins (e.g.P0C9J6), PubChem CID for compounds (e.g.5793), KEGG for pathways (e.g.hsa00010).

Value

input entities and the matched neo4j ids and grinn ids. Return empty list or data frame if error.

Author(s)

Kwanjeera W kwanich@ucdavis.edu

Examples

1
2
3
4
5
6
# Convert compound names
#kw <- list('1-Methylhistidine','D-Lactic acid')
#result <- convertId(x=kw, nodetype="compound", searchby="name")
# Query compounds by KEGG ids
#kw <- data.frame(kegg=c('C01152','C00256','C00345'),pval=c(0.01:0.3))
#result <- convertId(x=kw, nodetype="compound", searchby="xref")

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