annotateRegions: Annotate regions

Description Usage Arguments Details Value Examples

Description

This function adds metadata parallel to the regions slot of a GenomicInteractions object.

Usage

1
2
3
4
5
annotateRegions(GIObject, name, dat)

## S4 method for signature 'GenomicInteractions,character,vector'
annotateRegions(GIObject,
  name, dat)

Arguments

GIObject

A GenomicInteractions object.

name

Character vector to be used as the column name.

dat

Vector of the same length as regions(GIObject, 1), containing data with which to annotate the object.

Details

This function only works if both regions(GIObject, 1) and regions(GIObject, 2) are identical. In cases where they are not identical, it doesn't make sense to assign a single dat vector to the metadata.

Value

NULL is invisibly returned, while the value passed as GIObject is modified in the global namespace.

Examples

1
2
3
4
5
6
7
data(hic_example_data)
hic_example_data <- updateObject(hic_example_data)
mcols(regions(hic_example_data, type=1))

chip <- runif(length(regions(hic_example_data, type=1)), max=1000)
annotateRegions(hic_example_data, "chip", chip)
mcols(regions(hic_example_data, type=1))

LTLA/fugi documentation built on June 22, 2019, 8:50 p.m.