rcxToJson: Convert RCX aspects to JSON

Description Usage Arguments Details Value See Also Examples

View source: R/Json-toJson.R

Description

Functions for converting the different aspects to JSON following the CX data structure definition (see NDEx documentation: https://home.ndexbio.org/data-model/).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
rcxToJson(aspect, verbose = F, ...)

## Default S3 method:
rcxToJson(aspect, verbose = F, ...)

## S3 method for class 'MetaDataAspect'
rcxToJson(aspect, verbose = F, ...)

## S3 method for class 'NodesAspect'
rcxToJson(aspect, verbose = F, ...)

## S3 method for class 'EdgesAspect'
rcxToJson(aspect, verbose = F, ...)

## S3 method for class 'NodeAttributesAspect'
rcxToJson(aspect, verbose = F, ...)

## S3 method for class 'EdgeAttributesAspect'
rcxToJson(aspect, verbose = F, ...)

## S3 method for class 'NetworkAttributesAspect'
rcxToJson(aspect, verbose = F, ...)

## S3 method for class 'CartesianLayoutAspect'
rcxToJson(aspect, verbose = F, ...)

## S3 method for class 'CyGroupsAspect'
rcxToJson(aspect, verbose = F, ...)

## S3 method for class 'CyHiddenAttributesAspect'
rcxToJson(aspect, verbose = F, ...)

## S3 method for class 'CyNetworkRelationsAspect'
rcxToJson(aspect, verbose = F, ...)

## S3 method for class 'CySubNetworksAspect'
rcxToJson(aspect, verbose = F, ...)

## S3 method for class 'CyTableColumnAspect'
rcxToJson(aspect, verbose = F, ...)

## S3 method for class 'CyVisualPropertiesAspect'
rcxToJson(aspect, verbose = F, ...)

## S3 method for class 'CyVisualProperty'
rcxToJson(aspect, verbose = F, propertyOf = "", ...)

## S3 method for class 'CyVisualPropertyProperties'
rcxToJson(aspect, verbose = F, ...)

## S3 method for class 'CyVisualPropertyDependencies'
rcxToJson(aspect, verbose = F, ...)

## S3 method for class 'CyVisualPropertyMappings'
rcxToJson(aspect, verbose = F, ...)

Arguments

aspect

aspects of an RCX object

verbose

logical; whether to print what is happening

...

additional parameters, that might needed for extending

propertyOf

character; provide propertyOf (only necessary for CyVisualProperty)

Details

For converting RCX objects to JSON, each aspect is processed by a generic function for its aspect class. Those functions return a character only containing the JSON of this aspect, which is then combined by toCX to be a valid CX data structure.

To support the conversion for non-standard or own-defined aspects, generic functions for those aspect classes have to be implemented.

Value

character; JSON of an aspect

See Also

toCX, writeCX, jsonToRCX, readCX

Examples

1
2
nodes = createNodes(name = c("a","b","c","d","e","f"))
rcxToJson(nodes)

frankkramer-lab/RCX documentation built on July 14, 2021, 6:33 p.m.