makePermutedSets {chromVAR} | R Documentation

## makePermutedSets

### Description

Makes annotations sets with similar bias to input sets

### Usage

    makePermutedSets(object, annotations, ...)

    ## S4 method for signature 'SummarizedExperiment,SummarizedExperiment'
    makePermutedSets(object,
      annotations, bias = rowData(object)$bias, window = 10)

      ## S4 method for signature 'RangedSummarizedExperiment,SummarizedExperiment'
    makePermutedSets(object,
      annotations, bias = rowRanges(object)$bias, window = 10)

    ## S4 method for signature 'MatrixOrmatrix,SummarizedExperiment'
    makePermutedSets(object,
      annotations, bias, window = 10)

    ## S4 method for signature 'SummarizedExperiment,MatrixOrmatrix'
    makePermutedSets(object,
      annotations, bias = rowData(object)$bias, window = 10)

    ## S4 method for signature 'RangedSummarizedExperiment,MatrixOrmatrix'
    makePermutedSets(object,
      annotations, bias = rowRanges(object)$bias, window = 10)

    ## S4 method for signature 'MatrixOrmatrix,MatrixOrmatrix'
    makePermutedSets(object, annotations,
      bias, window = 10)

    ## S4 method for signature 'SummarizedExperiment,list'
    makePermutedSets(object, annotations,
      bias = rowData(object)$bias, window = 10)

    ## S4 method for signature 'RangedSummarizedExperiment,list'
    makePermutedSets(object,
      annotations, bias = rowRanges(object)$bias, window = 10)

    ## S4 method for signature 'MatrixOrmatrix,list'
    makePermutedSets(object, annotations, bias,
      window = 10)

### Arguments

`object` | fragment counts stored as RangedSummarizedExperiment, SummarizedExperiment, matrix, or Matrix
`annotations` | annotations as SummarizedExperiment, matrix, or list
`...` | additional arguments
`bias` | vector of some bias signal (usually gc content) for each row of object
`window` | number of nearest neighbors to consider

### Details

Will create nbins * 3 annotations based on sampling from peaks with a certain fragment count, fragment count, or fragment count & bias.

### Value

SummarizedExperiment storing bias bins annotation

### Methods (by class)

- `object = SummarizedExperiment,annotations = SummarizedExperiment`: method for SummarizedExperiment and SummarizedExperiment

- `object = RangedSummarizedExperiment,annotations = SummarizedExperiment`: method for RangedSummarizedExperiment and SummarizedExperiment

- `object = MatrixOrmatrix,annotations = SummarizedExperiment`: method for Matrix or matrix and SummarizedExperiment

- `object = SummarizedExperiment,annotations = MatrixOrmatrix`: method for SummarizedExperiment and MatrixOrmatrix

- `object = RangedSummarizedExperiment,annotations = MatrixOrmatrix`: method for RangedSummarizedExperiment and MatrixOrmatrix

- `object = MatrixOrmatrix,annotations = MatrixOrmatrix`: method for Matrix/matrix and Matrix/matrix

- `object = SummarizedExperiment,annotations = list`: method for SummarizedExperiment and list

- `object = RangedSummarizedExperiment,annotations = list`: method for RangedSummarizedExperiment and list

- `object = MatrixOrmatrix,annotations = list`: method for Matrix or matrix and list

### Author(s)

Alicia Schep

### Examples

    # Load very small example counts (already filtered)
    data(mini_counts, package = "chromVAR")
    data(example_motifs, package = "motifmatchr")
    library(motifmatchr)
    library(BSgenome.Hsapiens.UCSC.hg19)
    motif_ix <- matchMotifs(example_motifs, mini_counts,
                             genome = BSgenome.Hsapiens.UCSC.hg19)

    perm_sets <- makePermutedSets(mini_counts, motif_ix)

[Package chromVAR version 1.9.0 Index]