RMotifScan {esATAC} | R Documentation

## Search Motif Position in Given Regions

### Description

Search motif position in given genome regions according PWM matrix.

### Usage

    atacMotifScan(atacProc, peak = NULL, genome = NULL, motifPWM = NULL,
      min.score = "85%", scanO.dir = NULL, n.cores = NULL, prefix = NULL,
      use.SavedPWM = NULL, ...)

    ## S4 method for signature 'ATACProc'
    atacMotifScan(atacProc, peak = NULL, genome = NULL,
      motifPWM = NULL, min.score = "85%", scanO.dir = NULL, n.cores = NULL,
      prefix = NULL, use.SavedPWM = NULL, ...)

    motifscan(peak = NULL, genome = NULL, motifPWM = NULL,
      min.score = "85%", scanO.dir = NULL, n.cores = NULL, prefix = NULL,
      use.SavedPWM = NULL, ...)

### Arguments

`atacProc` | `ATACProc-class` object scalar. It has to be the return value of upstream process: `atacPeakCalling`.
`peak` | `Character` scalar. Input region path. UCSC bed file is recommented. Other file should be able to import as GRanges objects through import.
`genome` | A DNAString object.
`motifPWM` | `list` scalar. Default: from `setConfigure`. Every element in the `list` contains a motif PWM matrix. e.g. pwm <- list("CTCF" = CTCF_PWMmatrix)
`min.score` | The minimum score for counting a match. Can be given as a character string containing a percentage (e.g. "85 possible score or as a single number.
`scanO.dir` | `Character` scalar. the output file directory. This function will use the index in motifPWM as the file name to save the motif position information in separate files.
`n.cores` | How many core to run this function. Default: from `setConfigure`.
`prefix` | prefix for Output file.
`use.SavedPWM` | use local motif position information. This data is download or generate by users. it must be a rds file and the information saved as GRanges. Once this parameter is used, parameters "genome", "motifPWM", "min.score", "n.cores" will be set to NULL.
`...` | Additional arguments, currently unused.

### Details

This function scan motif position in a given genome regions.

### Value

An invisible `ATACProc-class` object scalar for downstream analysis.

### Author(s)

Wei Zhang

### See Also

`atacPeakCalling` `atacCutSiteCount` matchPWM subsetByOverlaps

### Examples

    library(BSgenome.Hsapiens.UCSC.hg19)
    library(R.utils)
    p1bz <- system.file("extdata", "Example_peak1.bed.bz2", package="esATAC")
    peak1_path <- as.vector(bunzip2(filename = p1bz,
    destname = file.path(getwd(), "Example_peak1.bed"),
    ext="bz2", FUN = bzfile, overwrite=TRUE, remove = FALSE))
    pwm <- readRDS(system.file("extdata", "motifPWM.rds", package="esATAC"))
    #motifscan(peak = peak1_path, genome = BSgenome.Hsapiens.UCSC.hg19,
    #motifPWM = pwm, prefix = "test")

[Package esATAC version 1.0.23 Index]