InteractionSet class {InteractionSet} | R Documentation

## InteractionSet class and constructors

### Description

The InteractionSet class stores information about pairwise genomic interactions, and is intended for use in data analysis from Hi-C or ChIA-PET experiments. Each row of the InteractionSet corresponds to a pairwise interaction between two loci, as defined in the GInteractions object. Each column corresponds to a library or sample. Each InteractionSet also contains one or more assays, intended to hold experimental data about interaction frequencies for each interaction in each sample.

### Usage

    ## S4 method for signature 'ANY,GInteractions'
    InteractionSet(assays, interactions, ...)

    ## S4 method for signature 'missing,missing'
    InteractionSet(assays, interactions, ...)

### Arguments

`assays` | A numeric matrix or a list or `SimpleList` of matrices, containing data for each interaction.
`interactions` | A GInteractions object of length equal to the number of rows in `assays`.
`...` | Other arguments to be passed to `SummarizedExperiment`.

### Details

The InteractionSet class inherits from the SummarizedExperiment class and has access to all of its data members and methods (see `?SummarizedExperiment-class` for more details). It also contains an additional `interactions` slot which holds a GInteractions object (or an object from any derived classes, e.g., StrictGInteractions). Each row of the InteractionSet object corresponds to a pairwise interaction between two genomic loci in `interactions`.

The constructor will return an InteractionSet object containing all of the specified information - for `InteractionSet,missing,missing-method`, an empty InteractionSet object is returned. Note that any `metadata` arguments will be placed in the metadata of the internal SummarizedExperiment object, not the metadata of the internal GInteractions object. This is consistent with the behaviour of similar classes like RangedSummarizedExperiment.

### Value

For the constructors, an InteractionSet object is returned.

### Author(s)

Aaron Lun

### See Also

`SummarizedExperiment`, `interaction-access`, `interaction-subset`, `interaction-compare`, `SummarizedExperiment-class`

### Examples

    example(GInteractions, echo=FALSE)
    Nlibs <- 4
    counts <- matrix(rpois(Np*Nlibs, lambda=10), ncol=Nlibs)
    colnames(counts) <- seq_len(Nlibs)

    iset <- InteractionSet(counts, gi)
    iset <- InteractionSet(counts, gi, colData=DataFrame(lib.size=1:Nlibs*1000))
    iset <- InteractionSet(counts, gi, metadata=list(name="My Hi-C data"))

    # Note differences in metadata storage:
    metadata(iset)
    metadata(interactions(iset))

[Package InteractionSet version 1.12.0 Index]