# enrichTF-Introduction

#### Zheng Wei, Shining Ma, Duren Zhana

#### 2024-05-01

# 1 Introduction

As transcription factors (TFs) play a crucial role in regulating the transcription process through binding on the genome alone or in a combinatorial manner, TF enrichment analysis is an efficient and important procedure to locate the candidate functional TFs from a set of experimentally defined regulatory regions. While it is commonly accepted that structurally related TFs may have similar binding preference to sequences (i.e. motifs) and one TF may have multiple motifs, TF enrichment analysis is much more challenging than motif enrichment analysis. Here we present a R package for TF enrichment analysis which combine motif enrichment with the PECA model.

# 2 Quick Start

## 2.1 Download and Installation

The package enrichTF is part of Bioconductor project starting from Bioc 3.9 built on R 3.6. To install the latest version of enrichTF, please check your current Bioconductor version and R version first. The latest version of R is recommended, and then you can download and install enrichTF and all its dependencies as follows:

    if (!requireNamespace("BiocManager", quietly=TRUE))
        install.packages("BiocManager")
    BiocManager::install("enrichTF")

## 2.2 Loading

Similar with other R packages, please load enrichTF each time before using the package.

    library(enrichTF)

## 2.3 Running with the default configuration

It is quite convenient to run the default pipeline.

Users only need to provide a region list in BED format which contains 3 columns (chr, start, end). It could be the peak calling result of sequencing data like ATAC-seq etc.

All required data and software will be installed automatically.

    # Provide your region list in BED format with 3 columns.
    foregroundBedPath <- system.file(package = "enrichTF", "extdata","testregion.bed")
    # Call the whole pipeline
    PECA_TF_enrich(inputForegroundBed = foregroundBedPath, genome = "testgenome") # change"testgenome" to one of "hg19", "hg38", "mm9", 'mm10' ! "testgenome" is only a test example.

    ## Configure bsgenome ...

    ##
    ## Attaching package: 'BiocGenerics'

    ## The following objects are masked from 'package:stats':
    ##
    ##     IQR, mad, sd, var, xtabs

    ## The following objects are masked from 'package:base':
    ##
    ##     Filter, Find, Map, Position, Reduce, anyDuplicated, aperm, append,
    ##     as.data.frame, basename, cbind, colnames, dirname, do.call,
    ##     duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
    ##     lapply, mapply, match, mget, order, paste, pmax, pmax.int, pmin,
    ##     pmin.int, rank, rbind, rownames, sapply, setdiff, table, tapply,
    ##     union, unique, unsplit, which.max, which.min

    ##
    ## Attaching package: 'S4Vectors'

    ## The following object is masked from 'package:utils':
    ##
    ##     findMatches

    ## The following objects are masked from 'package:base':
    ##
    ##     I, expand.grid, unname

    ##
    ## Attaching package: 'IRanges'

    ## The following object is masked from 'package:grDevices':
    ##
    ##     windows

    ##
    ## Attaching package: 'Biostrings'

    ## The following object is masked from 'package:base':
    ##
    ##     strsplit

    ##
    ## Attaching package: 'rtracklayer'

    ## The following object is masked from 'package:BiocIO':
    ##
    ##     FileForFormat

    ## Configure bsgenome finished

    ## Configure motifpwm ...

    ## Configure motifpwm finished

    ## Configure motifPWMOBJ ...

    ## Configure motifPWMOBJ finished

    ## Configure RE_gene_corr ...

    ## Configure RE_gene_corr finished

    ## Configure Enhancer_RE_gene_corr ...

    ## Configure Enhancer_RE_gene_corr finished

    ## Configure MotifTFTable ...

    ## Configure MotifTFTable finished

    ## Configure MotifWeights ...

    ## Configure MotifWeights finished

    ## Configure TFgeneRelMtx ...

    ## Configure TFgeneRelMtx finished

    ## Configure SampleName ...

    ## Configure SampleName finished

    ## Configure OpenRegion ...

    ## Configure OpenRegion finished

    ## Configure ConserveRegion ...

    ## Configure ConserveRegion finished

    ## Configure HOMER ...

    ## Configure HOMER finished

    ## Configure OrgDb ...

    ## Loading required package: AnnotationDbi

    ## Loading required package: Biobase

    ## Welcome to Bioconductor
    ##
    ##     Vignettes contain introductory material; view with
    ##     'browseVignettes()'. To cite Bioconductor, see
    ##     'citation("Biobase")', and for packages 'citation("pkgname")'.

    ##

    ## Configure OrgDb finished

    ## >>>>>>==========================================================

    ## Step Name:pipe_UnzipAndMergeBed

    ## All Parameters for This Step:

    ## |Input:

    ## |    bedInput:

    ## |        "F:/biocbuild/bbs-3.19-bioc/tmpdir/RtmpAbyoMR/Rinst34c8f3b6fa9/enrichTF/extdata/testregion.bed"

    ## |Output:

    ## |    bedOutput:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_00_pipe_UnzipAndMergeBed/testregion.bed"

    ## |Other Parameters:

    ## __________________________________________

    ## Begin to check if it is finished...

    ## 2024-05-01 18:34:30.31047

    ## New step. Start processing data:

    ## processing file:

    ## source:F:/biocbuild/bbs-3.19-bioc/tmpdir/RtmpAbyoMR/Rinst34c8f3b6fa9/enrichTF/extdata/testregion.bed

    ## destination:F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_00_pipe_UnzipAndMergeBed/testregion.bed

    ## 2024-05-01 18:34:30.332971

    ## processing finished

    ## [1] "2024-05-01 18:34:30 EDT"
    ## [1] "2024-05-01 18:34:30 EDT"
    ## [1] "2024-05-01 18:34:30 EDT"
    ## [1] "2024-05-01 18:34:30 EDT"
    ## [1] "2024-05-01 18:34:30 EDT"
    ## [1] "2024-05-01 18:34:30 EDT"

    ## All results have been saved.

    ## ==========================================================<<<<<<

    ##

    ## >>>>>>==========================================================

    ## Step Name:pipe_GenBackground

    ## All Parameters for This Step:

    ## |Input:

    ## |    inputForegroundBed:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_00_pipe_UnzipAndMergeBed/testregion.bed"

    ## |Output:

    ## |    outputForegroundBed:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_01_pipe_GenBackground/testregion.foreground.bed"

    ## |    outputBackgroundBed:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_01_pipe_GenBackground/testregion.background.bed"

    ## |    outputRegionBed:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_01_pipe_GenBackground/testregion.allregion.bed"

    ## |Other Parameters:

    ## |    bsgenome:

    ## |        An object of BSgenome

    ## |    regionLen:

    ## |        1000

    ## |    sampleNumb:

    ## |        0

    ## __________________________________________

    ## Begin to check if it is finished...

    ## 2024-05-01 18:34:30.63002

    ## New step. Start processing data:

    ## 2024-05-01 18:34:31.132984

    ## processing finished

    ## [1] "2024-05-01 18:34:31 EDT"
    ## [1] "2024-05-01 18:34:31 EDT"
    ## [1] "2024-05-01 18:34:31 EDT"
    ## [1] "2024-05-01 18:34:31 EDT"
    ## [1] "2024-05-01 18:34:31 EDT"
    ## [1] "2024-05-01 18:34:31 EDT"

    ## All results have been saved.

    ## ==========================================================<<<<<<

    ##

    ## >>>>>>==========================================================

    ## Step Name:pipe_RegionConnectTargetGene

    ## All Parameters for This Step:

    ## |Input:

    ## |    inputForegroundBed:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_01_pipe_GenBackground/testregion.foreground.bed"

    ## |    inputBackgroundBed:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_01_pipe_GenBackground/testregion.background.bed"

    ## |Output:

    ## |    outputForegroundBed:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_02_pipe_RegionConnectTargetGene/testregion.gene.foreground.bed"

    ## |    ouputForgroundGeneTxt:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_02_pipe_RegionConnectTargetGene/testregion.gene.foreground.txt"

    ## |    outputBackgroundBed:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_02_pipe_RegionConnectTargetGene/testregion.gene.background.bed"

    ## |    regularGeneCorrBed:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\refdir/testgenome/RE_gene_corr.bed"

    ## |    enhancerRegularGeneCorrBed:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\refdir/testgenome/Enhancer_RE_gene_corr.bed"

    ## |Other Parameters:

    ## __________________________________________

    ## Begin to check if it is finished...

    ## 2024-05-01 18:34:31.219282

    ## New step. Start processing data:

    ## 2024-05-01 18:34:32.154861

    ## processing finished

    ## [1] "2024-05-01 18:34:32 EDT"
    ## [1] "2024-05-01 18:34:32 EDT"
    ## [1] "2024-05-01 18:34:32 EDT"
    ## [1] "2024-05-01 18:34:32 EDT"
    ## [1] "2024-05-01 18:34:32 EDT"
    ## [1] "2024-05-01 18:34:32 EDT"

    ## All results have been saved.

    ## ==========================================================<<<<<<

    ##

    ## >>>>>>==========================================================

    ## Step Name:pipe_FindMotifsInRegions

    ## All Parameters for This Step:

    ## |Input:

    ## |    inputRegionBed:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_01_pipe_GenBackground/testregion.allregion.bed"

    ## |Output:

    ## |    outputRegionMotifBed:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_03_pipe_FindMotifsInRegions/testregion.region.motif.bed"

    ## |    outputMotifBed:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_03_pipe_FindMotifsInRegions/testregion.motif.bed"

    ## |Other Parameters:

    ## |    motifRc:

    ## |        "integrate"

    ## |    pwmObj:

    ## |        An object of PWMatrixList

    ## |    genome:

    ## |        "hg19"

    ## |    threads:

    ## |        2

    ## __________________________________________

    ## Begin to check if it is finished...

    ## 2024-05-01 18:34:32.270694

    ## New step. Start processing data:

    ## 2024-05-01 18:34:50.596948

    ## processing finished

    ## [1] "2024-05-01 18:34:50 EDT"
    ## [1] "2024-05-01 18:34:50 EDT"
    ## [1] "2024-05-01 18:34:50 EDT"
    ## [1] "2024-05-01 18:34:50 EDT"
    ## [1] "2024-05-01 18:34:50 EDT"
    ## [1] "2024-05-01 18:34:50 EDT"

    ## All results have been saved.

    ## ==========================================================<<<<<<

    ##

    ## >>>>>>==========================================================

    ## Step Name:pipe_TFsEnrichInRegions

    ## All Parameters for This Step:

    ## |Input:

    ## |    inputRegionBed:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_01_pipe_GenBackground/testregion.allregion.bed"

    ## |    inputRegionMotifBed:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_03_pipe_FindMotifsInRegions/testregion.region.motif.bed"

    ## |    inputForegroundGeneBed:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_02_pipe_RegionConnectTargetGene/testregion.gene.foreground.bed"

    ## |    inputBackgroundGeneBed:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_02_pipe_RegionConnectTargetGene/testregion.gene.background.bed"

    ## |    inputMotifWeights:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\refdir/testgenome/MotifWeights.RData"

    ## |    inputTFgeneRelMtx:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\refdir/testgenome/TFgeneRelMtx.RData"

    ## |    inputMotifTFTable:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\refdir/testgenome/MotifTFTable.RData"

    ## |Output:

    ## |    outputTFsEnrichTxt:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_04_pipe_TFsEnrichInRegions/testregion.PECA_TF_enrich.txt"

    ## |Other Parameters:

    ## __________________________________________

    ## Begin to check if it is finished...

    ## 2024-05-01 18:34:50.794734

    ## New step. Start processing data:

    ## 2024-05-01 18:35:07.05081

    ## processing finished

    ## [1] "2024-05-01 18:35:07 EDT"
    ## [1] "2024-05-01 18:35:07 EDT"
    ## [1] "2024-05-01 18:35:07 EDT"
    ## [1] "2024-05-01 18:35:07 EDT"
    ## [1] "2024-05-01 18:35:07 EDT"
    ## [1] "2024-05-01 18:35:07 EDT"

    ## All results have been saved.

    ## ==========================================================<<<<<<

    ##

# 3 How TF Enrichment Works

## 3.1 Basic Concept for Relations

In this work, we define four kinds of relations which will be introduced in detail. And we will show how to test on enriched TFs rather than enriched motifs.

### 3.1.1 Region-gene Relation Table

When users input a region list in BED format, the relations between regions and one gene can be obtained from two ways:

1. The regions which are overlapped with the functional region of this gene. This type of relation can be obtained from gene reference data.

2. The regions are enhancers or other distal regulatory elements of this gene. This type of relation can be derived from 3D genome sequencing experiments such as Hi-C and HiChIP.

As we have already integrated and organized the potential relations between regions and genes from both gene reference and experiment profiles, users can use this source to obtain region-gene relations for their input region list quite easily.

Moreover, users can also customize potential relations from their own work.

### 3.1.2 Gene-TF Relation Matrix

The correlation scores between genes and TFs come from our previous approach named PECA. These scores are scaled in the range [-1,1]. Users can also customize this relation matrix based on their own experiment data.

### 3.1.3 TF-motif Relation Table

As we know, one TF may relate to multiple motifs. Here, we manually annotated more than 700 motifs with their corresponding TFs.

### 3.1.4 Motif-region Relation Table

We scan all annotated motifs on each input region to check if there are some motifs located in this region. Then, the motif-region relation table can be generated.

## 3.2 Enrichment Test

Based on the foreground region list from users, this package can randomly sample the same number of regions from genome as background.

### 3.2.1 Enrichment t-test

Foreground and background region lists can both be connected with genes in Region-gene Relation Table, so both of them will get a gene list. We name them as the foreground gene list and background gene list, respectively.

For each TF, we will perform t-test and obtain p-values for TF-Gene scores of foreground vs those of background. These scores come from Gene-TF Relation Matrix.

### 3.2.2 Enrichment Fisher’s exact test without threshold

Each TF may be correlated with multiple motifs. For each motif, this package will do the following Fisher’s exact test to test if one motif is enriched in foreground regions.

| # with TF’s motif | # without TF’s motif
--- | --- | ---
# Foreground regions |  |
# Background regions |  |

Finally, the package will select the motif with the most significant p-value to represent this TF and then compute p-values for all of the TFs.

### 3.2.3 Enrichment Fisher’s exact test with threshold

Similar to previous section, the package will perform Fisher’s exact test with TF-Gene relation matrix. Different thresholds ([-1,1] with interval 0.1) for TF-Gene relation scores are used to filter the connected genes with foreground and background. In this way, we select the most significant p-value to represent this TF and calculate the p-values for all of TFs.

### 3.2.4 FDR

Finally, false discover rate correction is applied on the results of Fisher’s exact test with threshold. We rank all of the TFs based on their enrichment significance.

# 4 Customized Workflow

There are 4 steps to customize the workflow. You can follow the order below:

    printMap()

## 4.1 Prepare inputs

The function of `genBackground` is to generate random background regions based on the input regions and to set the length of input sequence regions. We try to select background sequence regions that match the GC-content distribution of the input sequence regions. The default length and number of background regions are 1000 and 10,000, respectively. The length of sequence regions used for motif finding is important. Here, we set 1000 as default value, which means for each region, we get sequences from -500 to +500 relative from center. For example,

    setGenome("testgenome")

    ## Configure bsgenome ...

    ## Configure bsgenome finished

    ## Configure motifpwm ...

    ## Configure motifpwm finished

    ## Configure motifPWMOBJ ...

    ## Configure motifPWMOBJ finished

    ## Configure RE_gene_corr ...

    ## Configure RE_gene_corr finished

    ## Configure Enhancer_RE_gene_corr ...

    ## Configure Enhancer_RE_gene_corr finished

    ## Configure MotifTFTable ...

    ## Configure MotifTFTable finished

    ## Configure MotifWeights ...

    ## Configure MotifWeights finished

    ## Configure TFgeneRelMtx ...

    ## Configure TFgeneRelMtx finished

    ## Configure SampleName ...

    ## Configure SampleName finished

    ## Configure OpenRegion ...

    ## Configure OpenRegion finished

    ## Configure ConserveRegion ...

    ## Configure ConserveRegion finished

    ## Configure HOMER ...

    ## Configure HOMER finished

    ## Configure OrgDb ...

    ## Configure OrgDb finished

    foregroundBedPath <- system.file(package = "enrichTF", "extdata","testregion.bed")
    gen <- genBackground(inputForegroundBed = foregroundBedPath)

    ## >>>>>>==========================================================

    ## Step Name:pipe_GenBackground

    ## All Parameters for This Step:

    ## |Input:

    ## |    inputForegroundBed:

    ## |        "F:/biocbuild/bbs-3.19-bioc/tmpdir/RtmpAbyoMR/Rinst34c8f3b6fa9/enrichTF/extdata/testregion.bed"

    ## |Output:

    ## |    outputForegroundBed:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_01_pipe_GenBackground/testregion.foreground.bed"

    ## |    outputBackgroundBed:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_01_pipe_GenBackground/testregion.background.bed"

    ## |    outputRegionBed:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_01_pipe_GenBackground/testregion.allregion.bed"

    ## |Other Parameters:

    ## |    bsgenome:

    ## |        An object of BSgenome

    ## |    regionLen:

    ## |        1000

    ## |    sampleNumb:

    ## |        0

    ## __________________________________________

    ## Begin to check if it is finished...

    ## [1] "2024-05-01 18:35:07 EDT"
    ## [1] "2024-05-01 18:35:07 EDT"
    ## [1] "2024-05-01 18:35:07 EDT"
    ## [1] "2024-05-01 18:35:07 EDT"
    ## [1] "2024-05-01 18:35:07 EDT"
    ## [1] "2024-05-01 18:35:07 EDT"

    ## 2024-05-01 18:35:07.609905

    ## New step. Start processing data:

    ## 2024-05-01 18:35:07.795298

    ## processing finished

    ## [1] "2024-05-01 18:35:07 EDT"
    ## [1] "2024-05-01 18:35:07 EDT"
    ## [1] "2024-05-01 18:35:07 EDT"
    ## [1] "2024-05-01 18:35:07 EDT"
    ## [1] "2024-05-01 18:35:07 EDT"
    ## [1] "2024-05-01 18:35:07 EDT"

    ## All results have been saved.

    ## ==========================================================<<<<<<

    ##

## 4.2 Motifscan

The function of `regionConnectTargetGene` is to connect foreground and background regions to their target genes, which are predicted from PECA model.

For example,

    conTG <- enrichRegionConnectTargetGene(gen)

    ## >>>>>>==========================================================

    ## Step Name:pipe_RegionConnectTargetGene

    ## All Parameters for This Step:

    ## |Input:

    ## |    inputForegroundBed:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_01_pipe_GenBackground/testregion.foreground.bed"

    ## |    inputBackgroundBed:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_01_pipe_GenBackground/testregion.background.bed"

    ## |Output:

    ## |    outputForegroundBed:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_02_pipe_RegionConnectTargetGene/testregion.gene.foreground.bed"

    ## |    ouputForgroundGeneTxt:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_02_pipe_RegionConnectTargetGene/testregion.gene.foreground.txt"

    ## |    outputBackgroundBed:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_02_pipe_RegionConnectTargetGene/testregion.gene.background.bed"

    ## |    regularGeneCorrBed:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\refdir/testgenome/RE_gene_corr.bed"

    ## |    enhancerRegularGeneCorrBed:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\refdir/testgenome/Enhancer_RE_gene_corr.bed"

    ## |Other Parameters:

    ## __________________________________________

    ## Begin to check if it is finished...

    ## [1] "2024-05-01 18:35:07 EDT"
    ## [1] "2024-05-01 18:35:07 EDT"
    ## [1] "2024-05-01 18:35:07 EDT"
    ## [1] "2024-05-01 18:35:08 EDT"
    ## [1] "2024-05-01 18:35:08 EDT"
    ## [1] "2024-05-01 18:35:08 EDT"

    ## 2024-05-01 18:35:08.013766

    ## New step. Start processing data:

    ## 2024-05-01 18:35:08.63277

    ## processing finished

    ## [1] "2024-05-01 18:35:08 EDT"
    ## [1] "2024-05-01 18:35:08 EDT"
    ## [1] "2024-05-01 18:35:08 EDT"
    ## [1] "2024-05-01 18:35:08 EDT"
    ## [1] "2024-05-01 18:35:08 EDT"
    ## [1] "2024-05-01 18:35:08 EDT"

    ## All results have been saved.

    ## ==========================================================<<<<<<

    ##

## 4.3 Connect regions with target genes

The function `MotifsInRegions` is to scan for motif occurrences using the prepared PWMs and obtain the promising candidate motifs in these regions.

For example,

    findMotif <- enrichFindMotifsInRegions(gen,motifRc="integrate")

    ## >>>>>>==========================================================

    ## Step Name:pipe_FindMotifsInRegions

    ## All Parameters for This Step:

    ## |Input:

    ## |    inputRegionBed:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_01_pipe_GenBackground/testregion.allregion.bed"

    ## |Output:

    ## |    outputRegionMotifBed:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_03_pipe_FindMotifsInRegions/testregion.region.motif.bed"

    ## |    outputMotifBed:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_03_pipe_FindMotifsInRegions/testregion.motif.bed"

    ## |Other Parameters:

    ## |    motifRc:

    ## |        "integrate"

    ## |    pwmObj:

    ## |        An object of PWMatrixList

    ## |    genome:

    ## |        "hg19"

    ## |    threads:

    ## |        2

    ## __________________________________________

    ## Begin to check if it is finished...

    ## [1] "2024-05-01 18:35:08 EDT"
    ## [1] "2024-05-01 18:35:08 EDT"
    ## [1] "2024-05-01 18:35:08 EDT"
    ## [1] "2024-05-01 18:35:08 EDT"
    ## [1] "2024-05-01 18:35:08 EDT"
    ## [1] "2024-05-01 18:35:08 EDT"

    ## 2024-05-01 18:35:08.841289

    ## New step. Start processing data:

    ## 2024-05-01 18:35:26.607077

    ## processing finished

    ## [1] "2024-05-01 18:35:26 EDT"
    ## [1] "2024-05-01 18:35:26 EDT"
    ## [1] "2024-05-01 18:35:26 EDT"
    ## [1] "2024-05-01 18:35:26 EDT"
    ## [1] "2024-05-01 18:35:26 EDT"
    ## [1] "2024-05-01 18:35:26 EDT"

    ## All results have been saved.

    ## ==========================================================<<<<<<

    ##

## 4.4 TF enrichment test

The function of `TFsEnrichInRegions` is to test whether each TF is enriched on input regions. For example,

    result <- enrichTFsEnrichInRegions(gen)

    ## >>>>>>==========================================================

    ## Step Name:pipe_TFsEnrichInRegions

    ## All Parameters for This Step:

    ## |Input:

    ## |    inputRegionBed:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_01_pipe_GenBackground/testregion.allregion.bed"

    ## |    inputRegionMotifBed:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_03_pipe_FindMotifsInRegions/testregion.region.motif.bed"

    ## |    inputForegroundGeneBed:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_02_pipe_RegionConnectTargetGene/testregion.gene.foreground.bed"

    ## |    inputBackgroundGeneBed:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_02_pipe_RegionConnectTargetGene/testregion.gene.background.bed"

    ## |    inputMotifWeights:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\refdir/testgenome/MotifWeights.RData"

    ## |    inputTFgeneRelMtx:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\refdir/testgenome/TFgeneRelMtx.RData"

    ## |    inputMotifTFTable:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\refdir/testgenome/MotifTFTable.RData"

    ## |Output:

    ## |    outputTFsEnrichTxt:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_04_pipe_TFsEnrichInRegions/testregion.PECA_TF_enrich.txt"

    ## |Other Parameters:

    ## __________________________________________

    ## Begin to check if it is finished...

    ## [1] "2024-05-01 18:35:26 EDT"
    ## [1] "2024-05-01 18:35:26 EDT"
    ## [1] "2024-05-01 18:35:26 EDT"
    ## [1] "2024-05-01 18:35:26 EDT"
    ## [1] "2024-05-01 18:35:26 EDT"
    ## [1] "2024-05-01 18:35:26 EDT"

    ## 2024-05-01 18:35:26.933217

    ## New step. Start processing data:

    ## 2024-05-01 18:35:43.798846

    ## processing finished

    ## [1] "2024-05-01 18:35:43 EDT"
    ## [1] "2024-05-01 18:35:43 EDT"
    ## [1] "2024-05-01 18:35:43 EDT"
    ## [1] "2024-05-01 18:35:43 EDT"
    ## [1] "2024-05-01 18:35:43 EDT"
    ## [1] "2024-05-01 18:35:43 EDT"

    ## All results have been saved.

    ## ==========================================================<<<<<<

    ##

## 4.5 Building a pipeline

Users can build a pipeline easily based on pipeFrame (pipeline framework)

    library(magrittr)

    ##
    ## Attaching package: 'magrittr'

    ## The following object is masked from 'package:GenomicRanges':
    ##
    ##     subtract

    setGenome("testgenome")

    ## Configure bsgenome ...

    ## Configure bsgenome finished

    ## Configure motifpwm ...

    ## Configure motifpwm finished

    ## Configure motifPWMOBJ ...

    ## Configure motifPWMOBJ finished

    ## Configure RE_gene_corr ...

    ## Configure RE_gene_corr finished

    ## Configure Enhancer_RE_gene_corr ...

    ## Configure Enhancer_RE_gene_corr finished

    ## Configure MotifTFTable ...

    ## Configure MotifTFTable finished

    ## Configure MotifWeights ...

    ## Configure MotifWeights finished

    ## Configure TFgeneRelMtx ...

    ## Configure TFgeneRelMtx finished

    ## Configure SampleName ...

    ## Configure SampleName finished

    ## Configure OpenRegion ...

    ## Configure OpenRegion finished

    ## Configure ConserveRegion ...

    ## Configure ConserveRegion finished

    ## Configure HOMER ...

    ## Configure HOMER finished

    ## Configure OrgDb ...

    ## Configure OrgDb finished

    foregroundBedPath <- system.file(package = "enrichTF", "extdata","testregion.bed")
    result <- genBackground(inputForegroundBed = foregroundBedPath) %>%
    enrichRegionConnectTargetGene%>%
    enrichFindMotifsInRegions(motifRc="integrate") %>%
    enrichTFsEnrichInRegions

    ## >>>>>>==========================================================

    ## Step Name:pipe_GenBackground

    ## All Parameters for This Step:

    ## |Input:

    ## |    inputForegroundBed:

    ## |        "F:/biocbuild/bbs-3.19-bioc/tmpdir/RtmpAbyoMR/Rinst34c8f3b6fa9/enrichTF/extdata/testregion.bed"

    ## |Output:

    ## |    outputForegroundBed:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_01_pipe_GenBackground/testregion.foreground.bed"

    ## |    outputBackgroundBed:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_01_pipe_GenBackground/testregion.background.bed"

    ## |    outputRegionBed:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_01_pipe_GenBackground/testregion.allregion.bed"

    ## |Other Parameters:

    ## |    bsgenome:

    ## |        An object of BSgenome

    ## |    regionLen:

    ## |        1000

    ## |    sampleNumb:

    ## |        0

    ## __________________________________________

    ## Begin to check if it is finished...

    ## [1] "2024-05-01 18:35:44 EDT"
    ## [1] "2024-05-01 18:35:44 EDT"
    ## [1] "2024-05-01 18:35:44 EDT"
    ## [1] "2024-05-01 18:35:44 EDT"
    ## [1] "2024-05-01 18:35:44 EDT"
    ## [1] "2024-05-01 18:35:44 EDT"

    ## The step:`pipe_GenBackground` was finished. Nothing to do.

    ## If you need to redo or rerun this step,please call 'clearStepCache(YourStepObject)'or remove file: F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_01_pipe_GenBackground/pipeFrame.obj.36cba189.rds

    ## ==========================================================<<<<<<

    ##

    ## >>>>>>==========================================================

    ## Step Name:pipe_RegionConnectTargetGene

    ## All Parameters for This Step:

    ## |Input:

    ## |    inputForegroundBed:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_01_pipe_GenBackground/testregion.foreground.bed"

    ## |    inputBackgroundBed:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_01_pipe_GenBackground/testregion.background.bed"

    ## |Output:

    ## |    outputForegroundBed:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_02_pipe_RegionConnectTargetGene/testregion.gene.foreground.bed"

    ## |    ouputForgroundGeneTxt:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_02_pipe_RegionConnectTargetGene/testregion.gene.foreground.txt"

    ## |    outputBackgroundBed:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_02_pipe_RegionConnectTargetGene/testregion.gene.background.bed"

    ## |    regularGeneCorrBed:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\refdir/testgenome/RE_gene_corr.bed"

    ## |    enhancerRegularGeneCorrBed:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\refdir/testgenome/Enhancer_RE_gene_corr.bed"

    ## |Other Parameters:

    ## __________________________________________

    ## Begin to check if it is finished...

    ## [1] "2024-05-01 18:35:44 EDT"
    ## [1] "2024-05-01 18:35:44 EDT"
    ## [1] "2024-05-01 18:35:44 EDT"
    ## [1] "2024-05-01 18:35:44 EDT"
    ## [1] "2024-05-01 18:35:44 EDT"
    ## [1] "2024-05-01 18:35:44 EDT"

    ## The step:`pipe_RegionConnectTargetGene` was finished. Nothing to do.

    ## If you need to redo or rerun this step,please call 'clearStepCache(YourStepObject)'or remove file: F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_02_pipe_RegionConnectTargetGene/pipeFrame.obj.aa5ab12d.rds

    ## ==========================================================<<<<<<

    ##

    ## >>>>>>==========================================================

    ## Step Name:pipe_FindMotifsInRegions

    ## All Parameters for This Step:

    ## |Input:

    ## |    inputRegionBed:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_01_pipe_GenBackground/testregion.allregion.bed"

    ## |Output:

    ## |    outputRegionMotifBed:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_03_pipe_FindMotifsInRegions/testregion.region.motif.bed"

    ## |    outputMotifBed:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_03_pipe_FindMotifsInRegions/testregion.motif.bed"

    ## |Other Parameters:

    ## |    motifRc:

    ## |        "integrate"

    ## |    pwmObj:

    ## |        An object of PWMatrixList

    ## |    genome:

    ## |        "hg19"

    ## |    threads:

    ## |        2

    ## __________________________________________

    ## Begin to check if it is finished...

    ## [1] "2024-05-01 18:35:44 EDT"
    ## [1] "2024-05-01 18:35:44 EDT"
    ## [1] "2024-05-01 18:35:44 EDT"
    ## [1] "2024-05-01 18:35:44 EDT"
    ## [1] "2024-05-01 18:35:44 EDT"
    ## [1] "2024-05-01 18:35:44 EDT"

    ## The step:`pipe_FindMotifsInRegions` was finished. Nothing to do.

    ## If you need to redo or rerun this step,please call 'clearStepCache(YourStepObject)'or remove file: F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_03_pipe_FindMotifsInRegions/pipeFrame.obj.cbd0496c.rds

    ## ==========================================================<<<<<<

    ##

    ## >>>>>>==========================================================

    ## Step Name:pipe_TFsEnrichInRegions

    ## All Parameters for This Step:

    ## |Input:

    ## |    inputRegionBed:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_01_pipe_GenBackground/testregion.allregion.bed"

    ## |    inputRegionMotifBed:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_03_pipe_FindMotifsInRegions/testregion.region.motif.bed"

    ## |    inputForegroundGeneBed:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_02_pipe_RegionConnectTargetGene/testregion.gene.foreground.bed"

    ## |    inputBackgroundGeneBed:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_02_pipe_RegionConnectTargetGene/testregion.gene.background.bed"

    ## |    inputMotifWeights:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\refdir/testgenome/MotifWeights.RData"

    ## |    inputTFgeneRelMtx:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\refdir/testgenome/TFgeneRelMtx.RData"

    ## |    inputMotifTFTable:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\refdir/testgenome/MotifTFTable.RData"

    ## |Output:

    ## |    outputTFsEnrichTxt:

    ## |        "F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_04_pipe_TFsEnrichInRegions/testregion.PECA_TF_enrich.txt"

    ## |Other Parameters:

    ## __________________________________________

    ## Begin to check if it is finished...

    ## [1] "2024-05-01 18:35:44 EDT"
    ## [1] "2024-05-01 18:35:44 EDT"
    ## [1] "2024-05-01 18:35:44 EDT"
    ## [1] "2024-05-01 18:35:44 EDT"
    ## [1] "2024-05-01 18:35:44 EDT"
    ## [1] "2024-05-01 18:35:44 EDT"

    ## The step:`pipe_TFsEnrichInRegions` was finished. Nothing to do.

    ## If you need to redo or rerun this step,please call 'clearStepCache(YourStepObject)'or remove file: F:\biocbuild\bbs-3.19-bioc\tmpdir\RtmpAbyoMR\Rbuild34c81708638c\enrichTF\vignettes\enrichTF-pipeline/Step_04_pipe_TFsEnrichInRegions/pipeFrame.obj.4dbcd0be.rds

    ## ==========================================================<<<<<<

    ##

## 4.6 Result

Here we show an example result when applying this package on our own data.

    examplefile  <- system.file(package = "enrichTF", "extdata","result.example.txt")
    read.table(examplefile, sep='\t', header = TRUE)%>%
      knitr::kable()

TF | Motif_enrichment | Targt_gene_enrichment | P_value | FDR
--- | --- | --- | --- | ---
MITF | 0.0000000 | 0.0383390 | 0e+00 | 0.00e+00
TFEC | 0.0000000 | 0.4857386 | 0e+00 | 0.00e+00
MLX | 0.0000000 | 0.8147766 | 0e+00 | 0.00e+00
TFEB | 0.0000000 | 0.5303603 | 0e+00 | 0.00e+00
TFE3 | 0.0000000 | 0.4067377 | 0e+00 | 0.00e+00
MZF1 | 0.0000000 | 0.0532782 | 0e+00 | 5.00e-07
USF2 | 0.0000000 | 0.5766573 | 0e+00 | 9.00e-07
USF1 | 0.0000000 | 0.2185547 | 0e+00 | 9.00e-07
CEBPA | 0.0000012 | 0.0046147 | 0e+00 | 1.50e-06
PKNOX2 | 0.0000001 | 0.0140376 | 0e+00 | 2.30e-06
FOXA3 | 0.0000071 | 0.8939957 | 0e+00 | 2.30e-06
CEBPB | 0.0000012 | 0.0118270 | 0e+00 | 2.30e-06
PKNOX1 | 0.0000001 | 0.9561768 | 0e+00 | 2.30e-06
MEIS1 | 0.0000001 | 0.1229445 | 1e-07 | 2.40e-06
TGIF1 | 0.0000001 | 0.2912322 | 1e-07 | 2.40e-06
TGIF2 | 0.0000001 | 0.9898682 | 1e-07 | 2.40e-06
FOXD3 | 0.0000071 | 0.8125302 | 1e-07 | 4.10e-06
MEIS2 | 0.0000001 | 0.8463790 | 1e-07 | 5.00e-06
DLX3 | 0.0000477 | 0.0043755 | 2e-07 | 5.90e-06
MYCN | 0.0000004 | 0.4520504 | 2e-07 | 7.30e-06
FOXG1 | 0.0000071 | 0.8432650 | 2e-07 | 7.40e-06
ID1 | 0.0000017 | 0.0093116 | 3e-07 | 9.60e-06
MAX | 0.0000017 | 0.5516440 | 3e-07 | 1.04e-05
FOXC2 | 0.0000071 | 0.8538362 | 4e-07 | 1.09e-05
DLX5 | 0.0000477 | 0.0017341 | 4e-07 | 1.09e-05
MYC | 0.0000004 | 0.2194055 | 4e-07 | 1.11e-05
MEIS3 | 0.0000001 | 0.8591956 | 4e-07 | 1.11e-05
RORA | 0.0001585 | 0.0021495 | 4e-07 | 1.11e-05
CREB3L2 | 0.0000017 | 0.6550453 | 5e-07 | 1.15e-05

# 5 Session Information

    sessionInfo()

    ## R version 4.4.0 beta (2024-04-15 r86425 ucrt)
    ## Platform: x86_64-w64-mingw32/x64
    ## Running under: Windows Server 2022 x64 (build 20348)
    ##
    ## Matrix products: default
    ##
    ##
    ## locale:
    ## [1] LC_COLLATE=C
    ## [2] LC_CTYPE=English_United States.utf8
    ## [3] LC_MONETARY=English_United States.utf8
    ## [4] LC_NUMERIC=C
    ## [5] LC_TIME=English_United States.utf8
    ##
    ## time zone: America/New_York
    ## tzcode source: internal
    ##
    ## attached base packages:
    ## [1] stats4    stats     graphics  grDevices utils     datasets  methods
    ## [8] base
    ##
    ## other attached packages:
    ##  [1] magrittr_2.0.3                    org.Hs.eg.db_3.19.1
    ##  [3] AnnotationDbi_1.66.0              Biobase_2.64.0
    ##  [5] BSgenome.Hsapiens.UCSC.hg19_1.4.3 BSgenome_1.72.0
    ##  [7] rtracklayer_1.64.0                BiocIO_1.14.0
    ##  [9] Biostrings_2.72.0                 XVector_0.44.0
    ## [11] GenomicRanges_1.56.0              GenomeInfoDb_1.40.0
    ## [13] IRanges_2.38.0                    S4Vectors_0.42.0
    ## [15] BiocGenerics_0.50.0               enrichTF_1.20.0
    ## [17] pipeFrame_1.20.0
    ##
    ## loaded via a namespace (and not attached):
    ##   [1] splines_4.4.0               bitops_1.0-7
    ##   [3] ggplotify_0.1.2             tibble_3.2.1
    ##   [5] R.oo_1.26.0                 polyclip_1.10-6
    ##   [7] XML_3.99-0.16.1             DirichletMultinomial_1.46.0
    ##   [9] lifecycle_1.0.4             pwalign_1.0.0
    ##  [11] rstatix_0.7.2               fastcluster_1.2.6
    ##  [13] lattice_0.22-6              MASS_7.3-60.2
    ##  [15] heatmap3_1.1.9              backports_1.4.1
    ##  [17] sass_0.4.9                  rmarkdown_2.26
    ##  [19] jquerylib_0.1.4             yaml_2.3.8
    ##  [21] cowplot_1.1.3               DBI_1.2.2
    ##  [23] CNEr_1.40.0                 RColorBrewer_1.1-3
    ##  [25] abind_1.4-5                 zlibbioc_1.50.0
    ##  [27] purrr_1.0.2                 R.utils_2.12.3
    ##  [29] ggraph_2.2.1                RCurl_1.98-1.14
    ##  [31] yulab.utils_0.1.4           pracma_2.4.4
    ##  [33] tweenr_2.0.3                GenomeInfoDbData_1.2.12
    ##  [35] enrichplot_1.24.0           ggrepel_0.9.5
    ##  [37] tidytree_0.4.6              seqLogo_1.70.0
    ##  [39] annotate_1.82.0             codetools_0.2-20
    ##  [41] DelayedArray_0.30.0         DOSE_3.30.0
    ##  [43] ggforce_0.4.2               tidyselect_1.2.1
    ##  [45] aplot_0.2.2                 UCSC.utils_1.0.0
    ##  [47] farver_2.1.1                viridis_0.6.5
    ##  [49] matrixStats_1.3.0           GenomicAlignments_1.40.0
    ##  [51] jsonlite_1.8.8              tidygraph_1.3.1
    ##  [53] motifmatchr_1.26.0          tools_4.4.0
    ##  [55] treeio_1.28.0               TFMPvalue_0.0.9
    ##  [57] Rcpp_1.0.12                 glue_1.7.0
    ##  [59] gridExtra_2.3               SparseArray_1.4.0
    ##  [61] xfun_0.43                   qvalue_2.36.0
    ##  [63] MatrixGenerics_1.16.0       dplyr_1.1.4
    ##  [65] withr_3.0.0                 BiocManager_1.30.22
    ##  [67] fastmap_1.1.1               fansi_1.0.6
    ##  [69] caTools_1.18.2              digest_0.6.35
    ##  [71] R6_2.5.1                    gridGraphics_0.5-1
    ##  [73] colorspace_2.1-0            GO.db_3.19.1
    ##  [75] gtools_3.9.5                poweRlaw_0.80.0
    ##  [77] RSQLite_2.3.6               R.methodsS3_1.8.2
    ##  [79] utf8_1.2.4                  tidyr_1.3.1
    ##  [81] generics_0.1.3              data.table_1.15.4
    ##  [83] graphlayouts_1.1.1          httr_1.4.7
    ##  [85] htmlwidgets_1.6.4           S4Arrays_1.4.0
    ##  [87] scatterpie_0.2.2            TFBSTools_1.42.0
    ##  [89] pkgconfig_2.0.3             gtable_0.3.5
    ##  [91] blob_1.2.4                  clusterProfiler_4.12.0
    ##  [93] shadowtext_0.1.3            htmltools_0.5.8.1
    ##  [95] carData_3.0-5               fgsea_1.30.0
    ##  [97] scales_1.3.0                png_0.1-8
    ##  [99] ggfun_0.1.4                 knitr_1.46
    ## [101] tzdb_0.4.0                  reshape2_1.4.4
    ## [103] rjson_0.2.21                visNetwork_2.1.2
    ## [105] nlme_3.1-164                curl_5.2.1
    ## [107] JASPAR2018_1.1.1            cachem_1.0.8
    ## [109] stringr_1.5.1               parallel_4.4.0
    ## [111] HDO.db_0.99.1               restfulr_0.0.15
    ## [113] pillar_1.9.0                grid_4.4.0
    ## [115] vctrs_0.6.5                 ggpubr_0.6.0
    ## [117] car_3.1-2                   xtable_1.8-4
    ## [119] evaluate_0.23               readr_2.1.5
    ## [121] cli_3.6.2                   compiler_4.4.0
    ## [123] Rsamtools_2.20.0            rlang_1.1.3
    ## [125] crayon_1.5.2                ggsignif_0.6.4
    ## [127] plyr_1.8.9                  fs_1.6.4
    ## [129] stringi_1.8.3               viridisLite_0.4.2
    ## [131] BiocParallel_1.38.0         munsell_0.5.1
    ## [133] lazyeval_0.2.2              GOSemSim_2.30.0
    ## [135] Matrix_1.7-0                hms_1.1.3
    ## [137] patchwork_1.2.0             bit64_4.0.5
    ## [139] ggplot2_3.5.1               KEGGREST_1.44.0
    ## [141] SummarizedExperiment_1.34.0 broom_1.0.5
    ## [143] igraph_2.0.3                memoise_2.0.1
    ## [145] bslib_0.7.0                 ggtree_3.12.0
    ## [147] fastmatch_1.1-4             bit_4.0.5
    ## [149] ape_5.8                     gson_0.1.0