TFsEnrichInRegions {enrichTF} | R Documentation

## Test each TF is enriched in regions or not

### Description

Test each TF is enriched in regions or not

### Usage

    enrichTFsEnrichInRegions(
      prevStep,
      inputRegionBed = NULL,
      inputForegroundGeneBed = NULL,
      inputBackgroundGeneBed = NULL,
      inputRegionMotifBed = NULL,
      outputTFsEnrichTxt = NULL,
      inputMotifWeights = NULL,
      inputTFgeneRelMtx = NULL,
      inputMotifTFTable = NULL,
      ...
    )

    ## S4 method for signature 'Step'
    enrichTFsEnrichInRegions(
      prevStep,
      inputRegionBed = NULL,
      inputForegroundGeneBed = NULL,
      inputBackgroundGeneBed = NULL,
      inputRegionMotifBed = NULL,
      outputTFsEnrichTxt = NULL,
      inputMotifWeights = NULL,
      inputTFgeneRelMtx = NULL,
      inputMotifTFTable = NULL,
      ...
    )

    tfsEnrichInRegions(
      inputRegionBed,
      inputForegroundGeneBed,
      inputBackgroundGeneBed,
      inputRegionMotifBed,
      outputTFsEnrichTxt = NULL,
      inputMotifWeights = NULL,
      inputTFgeneRelMtx = NULL,
      inputMotifTFTable = NULL,
      ...
    )

### 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. Directory of Regions BED file including foreground and background
`inputForegroundGeneBed` | `Character` scalar. Directory of BED file including foreground regions connected to related genes. The forth column is region ID
`inputBackgroundGeneBed` | `Character` scalar. Directory BED file including foreground regions connected to related genes. The forth column is region ID
`inputRegionMotifBed` | `Character` scalar. Directory BED file including foreground regions matched motifs. The forth column is region ID. The fifth column is motif calling score. The sixth column is motif name.
`outputTFsEnrichTxt` | `Character` scalar. Directory of Text result file with five columns. The first columns is transcription factor ,The second column is xxxx
`inputMotifWeights` | `Character` scalar. Directory of Text file contain motif weight. The first column is motif name. The second column is the weight. Default: NULL (if `setGenome` is called.)
`inputTFgeneRelMtx` | `Character` scalar. Directory of Text file contain a Transcription Factior(TF) and Gene relation weight matrix. Default: NULL (if `setGenome` is called.)
`inputMotifTFTable` | `Character` scalar. Directory of Text file contain Transcription Factior(TF) (the first column) and motif name(the second column). Default: NULL (if `setGenome` is called.)
`...` | Additional arguments, currently unused.

### Details

Connect foreground and background regions to targetGene. If you only use this function without previous steps and you do not familiar with the data format of the input, you can run the example to see the example input from previous steps.

### Value

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

### Author(s)

Zheng Wei

### See Also

`genBackground` `findMotifsInRegions` `tfsEnrichInRegions`

### Examples

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

    genBackground(inputForegroundBed = foregroundBedPath) %>%
        enrichRegionConnectTargetGene %>%
        enrichFindMotifsInRegions(motifRc="integrate") %>%
        enrichTFsEnrichInRegions

[Package enrichTF version 1.10.0 Index]