fetchNetwork: Query networks of a specific relationship from the database

Description Usage Arguments Details Value Author(s) See Also Examples

Description

query networks containing a specific relationship type between the given from and/or to nodes using neo4j id, see details.

Usage

1
fetchNetwork(from, to, fromtype, totype, reltype, returnas)

Arguments

from

a character vector of start nodes e.g. from = c('id1', 'id2'). Given from = NULL, will result in all possible start nodes. Otherwise the value must be a neo4j id, see details and see convertId for how to convert ids.

to

a character vector of end nodes e.g. to = c('id1', 'id2'). Given to = NULL, will result in all possible end nodes, see from for details.

fromtype

a string specifying the type of the start node. It can be one of compound, protein, gene, pathway, rna, dna, phenotype. The node types correspond to node labels of the database.

totype

a string specifying the type of end nodes, see fromtype for details.

reltype

a string specifying a relationship type. It can be one of annotation, biochemical_reaction, catalysis, control, conversion, genetic_association, molecular_binding.

returnas

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

Details

The function is specifically used to query one type of relationship. Use fetchHetNetwork to query networks containing one or more relationship types (heterogeneous network).

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

list of network information with the following components:

nodes:

id = node neo4j id

gid = node grinn id

nodename = node name

nodelabel = node type

nodexref = node cross references

edges:

source, target = node neo4j id

type = relationship type

datasource = relationship resource

properties = relationship properties

Return empty list if error or found nothing.

Author(s)

Kwanjeera W kwanich@ucdavis.edu

See Also

convertId, fetchHetNetwork

For database structure see http://grinnhomepage

Examples

1
2
3
4
5
6
7
# Query the network of (from:Compound)-BIOCHEMICAL_REACTION->(to:Compound)
#from = list(7097,41074,39189) #list of neo4j ids
#to = list(113,2440,554,102) #list of neo4j ids
#result = fetchNetwork(from=from, to=to, fromtype="compound", totype="compound", reltype="biochemical_reaction")
# Query the network of (:Protein)-CATALYSIS->(to:Compound)
#to = c(113,2440,554,102) #list of neo4j ids
#result = fetchNetwork(from=NULL, to=to, fromtype="protein", totype="compound", reltype="catalysis")

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