motifEnrichment: motifEnrichment

motifEnrichmentR Documentation

motifEnrichment

Description

function to find enrichment motif between two motifscan result

Usage

motifEnrichment(InputMotif, ControlMotif, ...)

## S4 method for signature 
## 'RangedSummarizedExperiment,RangedSummarizedExperiment'
motifEnrichment(InputMotif, ControlMotif)

Arguments

InputMotif

should be generated by motifScan with input peaks

ControlMotif

should be generated by motifScan, with control peaks and the same parameter of input peaks

Value

return Motif Enrichment data.frame of InputMotif by ControlMotif

Methods (by class)

  • motifEnrichment( InputMotif = RangedSummarizedExperiment, ControlMotif = RangedSummarizedExperiment ): RangedSummarizedExperiment/RangedSummarizedExperiment

Examples

example_motifs <- getJasparMotifs(species = "Homo sapiens",
                                  collection = "CORE")
# Make a set of input regions
Input <- GenomicRanges::GRanges(seqnames = c("chr1","chr2","chr2"),
                                ranges = IRanges::IRanges(start = c(76585873,42772928,
                                                                    100183786),
                                                          width = 500))
# Make a set of control regions
Control <- GenomicRanges::GRanges(seqnames = c("chr1","chr3","chr5"),
                                  ranges = IRanges::IRanges(start = c(453123,6524593,
                                                                      100184233),
                                                            width = 500))
# Scan motif for example motifs
motif_ix_input <- motifScan(example_motifs, Input, genome = "BSgenome.Hsapiens.UCSC.hg19")
motif_ix_control <- motifScan(example_motifs, Control, genome = "BSgenome.Hsapiens.UCSC.hg19")

# Find Enrichment motif of input by control
Enrichment_result <- motifEnrichment(motif_ix_input, motif_ix_control)


LouisKwok-PICB/motifscanr documentation built on July 22, 2024, 6:36 a.m.