MotifsInRegions {enrichTF} | R Documentation

## Find motifs in all input sequence regions

### Description

Scan for motif occurrences using the prepared PWMs and obtain the promising candidate motifs in these regions.

### Usage

    enrichFindMotifsInRegions(prevStep, inputRegionBed = NULL,
      outputRegionMotifBed = NULL, motifRc = c("integrate", "jaspar",
      "pwmfile"), inputPwmFile = getRefFiles("motifpwm"),
      genome = getGenome(), threads = getThreads(), ...)

    ## S4 method for signature 'Step'
    enrichFindMotifsInRegions(prevStep,
      inputRegionBed = NULL, outputRegionMotifBed = NULL,
      motifRc = c("integrate", "jaspar", "pwmfile"),
      inputPwmFile = getRefFiles("motifpwm"), genome = getGenome(),
      threads = getThreads(), ...)

    findMotifsInRegions(inputRegionBed, outputRegionMotifBed = NULL,
      motifRc = c("integrate", "jaspar", "pwmfile"),
      inputPwmFile = getRefFiles("motifpwm"), genome = getGenome(),
      threads = getThreads(), ...)

### Arguments

`prevStep` | `Step-class` object scalar. This parameter is available when the upstream step function (printMap() to see the previous functions) have been sucessfully called. Accepted value can be the object return by any step function or be feed by `%>%` from last step function.
`inputRegionBed` | `Character` scalar. BED file for regions including foreground and background sequences.
`outputRegionMotifBed` | `Character` scalar. BED file for regions with motif candidates. Default: NULL (generated base on inputForegroundBed)
`motifRc` | `Character` scalar. Motif Resources can be one of "integrate" (integrated by us and can be download from internet automatically if call the function `setGenome("hg19")`), "jaspar" package JASPAR2018, or "pwmfile" (User defined PWM file. inputPwmFile is required).
`inputPwmFile` | `Character` scalar. when "pwmfile" is set for motifRc, use this argument to provide PWM file directory.
`genome` | `Character` scalar. Bioconductor supported genome, such as "hg19", "mm10", etc. Default: NULL (e.g. after `library (enrichTF)`, you can call function `setGenome("hg19")`)
`threads` | `Integer` scalar. The maximum threads that will be used in this step. Default: getThreads()
`...` | Additional arguments, currently unused.

### Details

Scan for motif occurrences using the prepared PWMs and obtain the promising candidate motifs in these regions.

### Value

An invisible `EnrichStep-class` object (`Step-class` based) scalar for downstream analysis.

### Author(s)

Zheng Wei

### See Also

`genBackground` `findMotifsInRegions` `tfsEnrichInRegions`

### Examples

    setGenome("testgenome") #Use "hg19","hg38",etc. for your application
    foregroundBedPath <- system.file(package = "enrichTF",
        "extdata","testregion.bed")
    gen <- genBackground(inputForegroundBed = foregroundBedPath)
    findMotif <- enrichFindMotifsInRegions(gen,motifRc="integrate")

[Package enrichTF version 1.2.3 Index]