GO Enrichment on Integrated Results.

DEbPeakFE(
  de.peak,
  peak.fe.key,
  out.folder = NULL,
  go.type = c("ALL", "BP", "MF", "CC"),
  enrich.pvalue = 0.05,
  enrich.qvalue = 0.05,
  species = c("Human", "Mouse", "Rat", "Fly", "Arabidopsis", "Yeast", "Zebrafish",
    "Worm", "Bovine", "Pig", "Chicken", "Rhesus", "Canine", "Xenopus", "Anopheles",
    "Chimp", "E coli strain Sakai", "Myxococcus xanthus DK 1622"),
  padj.method = c("BH", "holm", "hochberg", "hommel", "bonferroni", "BY", "fdr",
    "none"),
  show.term = 15,
  str.width = 30,
  plot.resolution = 300,
  plot.width = 7,
  plot.height = 9,
  save = TRUE
)

Arguments

de.peak

Dataframe contains integrated results.

peak.fe.key

The key type of integrated results ("Type" column of de.peak) to perform functional enrichment.

out.folder

Folder to save enrichment results. Default: wording directory.

go.type

GO enrichment type, chosen from ALL, BP, MF, CC. Default: ALL.

enrich.pvalue

Cutoff value of pvalue. Default: 0.05.

enrich.qvalue

Cutoff value of qvalue. Default: 0.05.

species

Species used, chosen from "Human","Mouse","Rat","Fly","Arabidopsis","Yeast","Zebrafish","Worm","Bovine","Pig","Chicken","Rhesus", "Canine","Xenopus","Anopheles","Chimp","E coli strain Sakai","Myxococcus xanthus DK 1622". Default: "Human".

padj.method

One of "holm", "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr", "none". Default: BH.

show.term

Number of enrichment term to show. Default: 15.

str.width

Length of enrichment term in plot. Default: 30.

plot.resolution

Resolution of plot. Default: 300.

plot.width

The width of plot. Default: 7.

plot.height

The height of plot. Default: 9.

save

Logical value, whether to save all results. Default: TRUE.

Value

If save is TRUE, return NULL (all results are in out.folder), else retutn result dataframe.

Examples

library(DEbPeak) library(DESeq2) # ChIP-Seq data peak.file <- system.file("extdata", "debchip_peaks.bed", package = "DEbPeak") peak.df <- GetConsensusPeak(peak.file = peak.file) peak.profile <- PeakProfile(peak.df, species = "Mouse", by = "gene", region.type = "body", nbin = 800)
#> >> preparing promoter regions... 2023-07-02 17时14分07秒 #> >> preparing tag matrix... 2023-07-02 17时14分07秒 #> >> preparing start_site regions by ... 2023-07-02 17时14分07秒 #> >> preparing tag matrix... 2023-07-02 17时14分07秒 #> >> generating figure... 2023-07-02 17时14分11秒
#> >> done... 2023-07-02 17时14分11秒
#> >> binning method is used...2023-07-02 17时14分11秒 #> >> preparing start_site regions by gene... 2023-07-02 17时14分11秒 #> >> preparing tag matrix by binning... 2023-07-02 17时14分11秒 #> >> Running bootstrapping for tag matrix... 2023-07-02 17时14分20秒 #> >> binning method is used...2023-07-02 17时14分21秒 #> >> preparing body regions by gene... 2023-07-02 17时14分21秒 #> >> preparing tag matrix by binning... 2023-07-02 17时14分21秒 #> >> preparing matrix with extension from (TSS-20%)~(TTS+20%)... 2023-07-02 17时14分21秒 #> >> 1 peaks(0.1536098%), having lengths smaller than 800bp, are filtered... 2023-07-02 17时14分24秒 #> >> Running bootstrapping for tag matrix... 2023-07-02 17时15分06秒
peak.anno <- AnnoPeak( peak.df = peak.df, species = "Mouse", seq.style = "UCSC", up.dist = 20000, down.dist = 20000 )
#> >> preparing features information... 2023-07-02 17时15分07秒 #> >> identifying nearest features... 2023-07-02 17时15分07秒 #> >> calculating distance from peak to TSS... 2023-07-02 17时15分07秒 #> >> assigning genomic annotation... 2023-07-02 17时15分07秒 #> >> adding gene annotation... 2023-07-02 17时15分09秒
#> 'select()' returned 1:many mapping between keys and columns
#> >> assigning chromosome lengths 2023-07-02 17时15分09秒 #> >> done... 2023-07-02 17时15分09秒
#> Warning: Removed 6 rows containing non-finite values (`stat_count()`).
# RNA-Seq data count.file <- system.file("extdata", "debchip_count.txt", package = "DEbPeak") meta.file <- system.file("extdata", "debchip_meta.txt", package = "DEbPeak") count.matrix <- read.table(file = count.file, header = TRUE, sep = "\t") meta.info <- read.table(file = meta.file, header = TRUE) # create DESeqDataSet object dds <- DESeq2::DESeqDataSetFromMatrix( countData = count.matrix, colData = meta.info, design = ~condition )
#> Warning: some variables in design formula are characters, converting to factors
# set control level dds$condition <- relevel(dds$condition, ref = "NF") # conduct differential expressed genes analysis dds <- DESeq(dds)
#> estimating size factors
#> estimating dispersions
#> gene-wise dispersion estimates
#> mean-dispersion relationship
#> final dispersion estimates
#> fitting model and testing
# extract results dds.results <- results(dds, contrast = c("condition", "RX", "NF")) dds.results.ordered <- dds.results[order(dds.results$log2FoldChange, decreasing = TRUE), ] # Integrated with RNA-Seq debchip.res <- DEbPeak( de.res = dds.results.ordered, peak.res = peak.anno[["df"]], peak.anno.key = "Promoter", merge.key = "SYMBOL" )
#> Differential expression analysis with DESeq2!
# functional enrichment on UPbPeak genes upbpeak.fe.results <- DEbPeakFE( de.peak = debchip.res, peak.fe.key = "UPbPeak", species = "Mouse", save = FALSE )
#> conduct ALL GO enrichment analysis on: UPbPeak
#> wrong orderBy parameter; set to default `orderBy = "x"`
#> Scale for y is already present. #> Adding another scale for y, which will replace the existing scale.
#> wrong orderBy parameter; set to default `orderBy = "x"`
#> Scale for y is already present. #> Adding another scale for y, which will replace the existing scale.
#> wrong orderBy parameter; set to default `orderBy = "x"`
#> Scale for y is already present. #> Adding another scale for y, which will replace the existing scale.
# functional enrichment on DOWNbPeak genes downbpeak.fe.results <- DEbPeakFE( de.peak = debchip.res, peak.fe.key = "DOWNbPeak", species = "Mouse", save = FALSE )
#> conduct ALL GO enrichment analysis on: DOWNbPeak
#> wrong orderBy parameter; set to default `orderBy = "x"`
#> Scale for y is already present. #> Adding another scale for y, which will replace the existing scale.
#> wrong orderBy parameter; set to default `orderBy = "x"`
#> Scale for y is already present. #> Adding another scale for y, which will replace the existing scale.