Meta-data: Update RCX meta-data

Description Usage Arguments Details Value Note See Also Examples

Description

The meta-data aspect contains meta-data about the aspects in the RCX object. It can be generated automatically based on the aspects present in a RCX object:

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
updateMetaData(
  x,
  version = NULL,
  consistencyGroup = NULL,
  properties = NULL,
  aspectClasses = NULL
)

## S3 method for class 'RCX'
updateMetaData(
  x,
  version = NULL,
  consistencyGroup = NULL,
  properties = NULL,
  aspectClasses = NULL
)

## Default S3 method:
updateMetaData(
  x,
  version = NULL,
  consistencyGroup = NULL,
  properties = NULL,
  aspectClasses = NULL
)

Arguments

x

RCX object or an aspect of a RCX; its class must be one of the standard RCX aspect classes

version

named character (optional); version of the aspect (default:"1.0")

consistencyGroup

named numerical (optional); consistency group of the aspect (default:1)

properties

named list (optional); properties that need to be fetched or updated independently of aspect data

aspectClasses

named character; accession names and aspect classes aspectClasses

Details

If version, consistencyGroup or properties should have a different value, they can be set using a named vector (or named list for properties), where the name must be an accession name of that aspect in the RCX-object (e.g. nodes or cyVisualProperties).

Besides being a named list by aspect accession name, properties must also contain the single key-value pairs as a further named list. To remove all key-value pairs for one aspect, an empty list can be provided instead of a list with key-value pairs. To simplify adding of properties to a single aspect, there is the updateMetaDataProperties function available.

Value

MetaDataAspect object or RCX object

Note

The meta-data will always be updated automatically, when an aspect is added to or changed in the RCX object.

See Also

updateMetaDataProperties

Examples

 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
## prepare RCX object:
nodes = createNodes(name = c("a","b","c","d","e","f"))
edges = createEdges(source=c(1,2,0,0,0,2), 
                    target=c(2,3,1,2,5,4))
rcx = createRCX(nodes, edges)
cySubNetworks = createCySubNetworks(
  id = c(1,2),
  nodes = list("all", c(1,2,3)),
  edges = list("all", c(0,2))                    
)
rcx = updateCySubNetworks(rcx, cySubNetworks)

## update meta-data manually
rcx = updateMetaData(rcx)

## update meta-data with some values
rcx = updateMetaData(rcx,
                     version=c(edges="2.0"),
                     consistencyGroup=c(nodes=3),
                     properties=list(cySubNetworks=list(some="value",
                                                        another="VALUE"),
                                     edges=list(some="edge",
                                                another="EDGE")))

## remove all properties for edges
rcx = updateMetaData(rcx, properties=list(edges=list()))

frankkramer-lab/RCX documentation built on Oct. 26, 2021, 1:33 a.m.