GenBackground {enrichTF} | R Documentation

## Generate background regions and reset the size of foreground regions

### Description

Use uniform distribution to generate background sequence regions from genome. The size of foreground regions will be unified into the length specified in argument.

### Usage

    enrichGenBackground(prevStep, inputForegroundBed = NULL, genome = NULL,
      outputForegroundBed = NULL, outputBackgroundBed = NULL,
      outputRegionBed = NULL, regionLen = 1000, sampleNumb = 10000, ...)

    ## S4 method for signature 'Step'
    enrichGenBackground(prevStep, inputForegroundBed = NULL,
      genome = NULL, outputForegroundBed = NULL,
      outputBackgroundBed = NULL, outputRegionBed = NULL,
      regionLen = 1000, sampleNumb = NULL, ...)

    genBackground(inputForegroundBed, genome = NULL,
      outputForegroundBed = NULL, outputBackgroundBed = NULL,
      outputRegionBed = NULL, regionLen = 1000, sampleNumb = NULL, ...)

### Arguments

`prevStep` | `Step-class` object scalar. It needs to be the return value of upstream process from other packages, such as esATAC.
`inputForegroundBed` | `Character` scalar. The directory of foreground BED file.
`genome` | `Character` scalar. Bioconductor supported genome such as "hg19", "mm10", etc. Default: NULL (e.g. after library (enrichTF), you can call function `setGenome("hg19")`)
`outputForegroundBed` | `Character` scalar. The BED file directory of reshaped foreground regions. Default: NULL (generated base on inputForegroundBed)
`outputBackgroundBed` | `Character` scalar. The BED file directory of reshaped background regions. Default: NULL (generated base on inputForegroundBed)
`outputRegionBed` | `Character` scalar. Foreground and background merged BED files. Default: NULL (generated base on inputForegroundBed)
`regionLen` | `Character` scalar. It sets the length of forground sequence regions. Default: 1000
`sampleNumb` | `numeric` scalar. It sets the number of background regions that will be sampled. Default: 10000
`...` | Additional arguments, currently unused.

### Details

Use uniform distribution to generate background sequence regions from genome. The size of foreground regions will be unified into the length specified in argument.

### Value

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

### Author(s)

Zheng Wei

### See Also

`regionConnectTargetGene` `findMotifsInRegions` `tfsEnrichInRegions`

### Examples

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

[Package enrichTF version 1.2.3 Index]