getAnnotations {chromVAR} | R Documentation

## getAnnotations

### Description

getAnnotations

### Usage

    getAnnotations(annotations, ...)

    ## S4 method for signature 'GRangesList'
    getAnnotations(annotations, rowRanges, ...)

    ## S4 method for signature 'MatrixOrmatrix'
    getAnnotations(annotations, ...)

    ## S4 method for signature 'data.frame'
    getAnnotations(annotations, ...)

    ## S4 method for signature 'list'
    getAnnotations(annotations, npeaks = NULL, ...)

    ## S4 method for signature 'character'
    getAnnotations(annotations, rowRanges, column = NULL,
      ...)

### Arguments

`annotations` | matrix, Matrix, or data.frame of fragment counts, or SummarizedExperiment with counts assays, see details
`...` | additional arguments to pass to SummarizedExperiment
`rowRanges` | GenomicRanges or GenomicRangesList or RangedSummarizedExperiment
`npeaks` | number of peaks
`column` | column of bed file with annotation names, see details

### Value

SummarizedExperiment object with 'matches' assay

### Methods (by class)

- `GRangesList`: get annotation matrix from GRangesList

- `MatrixOrmatrix`: get annotation matrix from Matrix or matrix

- `data.frame`: get annotation matrix from data.frame

- `list`: get annotation matrix from list

- `character`: get annotations from bed files

### Author(s)

Alicia Schep

### Examples

    # First get example counts
    data(mini_counts, package = "chromVAR")

    # Get annotations from genomic ranges list
    library(GenomicRanges)
    library(SummarizedExperiment)
    my_annotation_granges <- GRangesList(GRanges("chr1",
                                                 ranges = IRanges(start =
                                                 c(566763,805090), width = 8)),
                                         GRanges("chr1", ranges = IRanges(start =
                                                   c(566792,895798), width = 8)))
    anno_ix <- getAnnotations(my_annotation_granges,
                               rowRanges = rowRanges(mini_counts))

[Package chromVAR version 1.14.0 Index]