fetchHetNetworkByGID: Query networks containing one or several relationship types...

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

Description

query networks of a relationship pattern that contains the given from and/or to nodes using grinn id (gid), see details.

Usage

1
fetchHetNetworkByGID(from, to, pattern, 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 grinn 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.

pattern

a string specifying the relationship pattern.

Providing a node as (from:Nodetype) is to specify the start node. Providing a node as (to:Nodetype) is to specify the end node. Providing a node as (:Nodetype) means any node of the given node type.

A relationship type is indicated by a pair of square brackets between the arrow e.g. -[:RELATIONSHIP_TYPE]->

returnas

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

Details

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

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, fetchNetworkByGID

For database structure see http://grinnhomepage

Examples

1
2
3
4
5
# Query the network of (from:Compound)-BIOCHEMICAL_REACTION->(to:Compound)<-ANNOTATION-(:Pathway)
#from = list('1060','284','760') #By default, PubChem ids can be used as grinn ids for compounds
#to = list('222656','107689','5950','71080') #By default, PubChem ids can be used as grinn ids for compounds
#pattern = "(from:Compound)-[:BIOCHEMICAL_REACTION]->(to:Compound)<-[:ANNOTATION]-(:Pathway)"
#result = fetchHetNetworkByGID(from=from, to=to, pattern=pattern)

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