annotateInteractions {GenomicInteractions} | R Documentation

## Annotate the interactions in a GInteractions object

### Description

This function will annotate both anchors with a list of named GRanges objects. Each metadata column is labeled "name.id" and contains the id of the genomic interval(s) it overlaps. Anonymous lists will be given names "FEATURE#.id" where # is the position in the list.

### Usage

    annotateInteractions(GIObject, annotations)

    ## S4 method for signature 'GInteractions,list'
    annotateInteractions(GIObject, annotations)

### Arguments

`GIObject` | A GInteractions object to be annotated
`annotations` | A list containing GRanges (or GRangesList) objects with which to annotate the GInteractions object.

### Details

For each anchor a "node.class" metadata column will also be added, containing the name of the list element which was first annotated to each range. Ranges with no overlaps will be classified as "distal". The identifiers for each individual feature/annotation are taken from either the name of the list item in the case of a GRangesList or from either the names of a the provided GRanges or an id column in its associated metadata.

### Value

invisible(1)

### Examples

    library("GenomicRanges")
    data(hic_example_data)
    data(mm9_refseq_promoters)
    mm9_refseq_grl = split(mm9_refseq_promoters, mm9_refseq_promoters$id)
    annotateInteractions(hic_example_data, list(promoter=mm9_refseq_grl))

[Package GenomicInteractions version 1.18.1 Index]