Integrate Two Peak Annotation/Differential Analysis Results.

PeakbPeak(
  peak1.res,
  peak2.res,
  peak.mode = c("consensus", "diff"),
  peak.anno.key = c("Promoter", "5' UTR", "3' UTR", "Exon", "Intron", "Downstream",
    "Distal Intergenic", "All"),
  peak1.signif = "padj",
  peak1.signif.threshold = 0.05,
  peak1.l2fc.threshold = 1,
  peak2.signif = "padj",
  peak2.signif.threshold = 0.05,
  peak2.l2fc.threshold = 1
)

Arguments

peak1.res

Peak1 dataframe contains all peak annotation (peak.mode is consensus) or differential analysis results of peak-related data (peak.mode is diff).

peak2.res

Peak2 dataframe contains all peak annotation (peak.mode is consensus) or differential analysis results of peak-related data (peak.mode is diff).

peak.mode

The source of peak results, choose from consensus (peak annotation) and diff (differential analysis). Default: consensus.

peak.anno.key

Peak location, chosen from "Promoter", "5' UTR", "3' UTR", "Exon", "Intron", "Downstream", "Distal Intergenic","All". Used when peak.mode is consensus. Default: "Promoter".

peak1.signif

Used when peak.mode is diff. Significance criterion for peak-associated results for Peak1. For DESeq2 results, can be chosen from padj, pvalue. For edgeR results, can be chosen from FDR, PValue. Default: padj.

peak1.signif.threshold

Used when peak.mode is diff. Significance threshold for peak-associated results to get differentially accessible/binding peaks for Peak1. Default: 0.05.

peak1.l2fc.threshold

Used when peak.mode is diff. Log2 fold change threshold for peak-associated results to get differentially accessible/binding peaks for Peak1. Default: 1.

peak2.signif

Used when peak.mode is diff. Significance criterion for peak-associated results for Peak2. For DESeq2 results, can be chosen from padj, pvalue. For edgeR results, can be chosen from FDR, PValue. Default: padj.

peak2.signif.threshold

Used when peak.mode is diff. Significance threshold for peak-associated results to get differentially accessible/binding peaks for Peak2. Default: 0.05.

peak2.l2fc.threshold

Used when peak.mode is diff. Log2 fold change threshold for peak-associated results to get differentially accessible/binding peaks for Peak2. Default: 1.

Value

Dataframe contains integration results. When peak.mode is 'diff', the 'Type' column contains "Down_Up", "Up_Up", "Down_Down", "Up_Down", "Peak1_Up", "Peak1_Down", "Peak2_Up", "Peak2_Down". When peak.mode is 'consensus', the 'Type' column contains "Common", "Peak1", "Peak2".

Examples

library(DEbPeak) # ChIP-seq data chip.file <- system.file("extdata", "debchip_peaks.bed", package = "DEbPeak") chip.df <- GetConsensusPeak(peak.file = chip.file) chip.anno <- AnnoPeak( peak.df = chip.df, species = "Mouse", seq.style = "UCSC", up.dist = 20000, down.dist = 20000 )
#> >> preparing features information... 2023-07-02 17时22分48秒 #> >> identifying nearest features... 2023-07-02 17时22分48秒 #> >> calculating distance from peak to TSS... 2023-07-02 17时22分48秒 #> >> assigning genomic annotation... 2023-07-02 17时22分48秒 #> >> adding gene annotation... 2023-07-02 17时22分50秒
#> 'select()' returned 1:many mapping between keys and columns
#> >> assigning chromosome lengths 2023-07-02 17时22分50秒 #> >> done... 2023-07-02 17时22分50秒
#> Warning: Removed 6 rows containing non-finite values (`stat_count()`).
# ATAC-seq data atac.file <- system.file("extdata", "debatac_peaks.bed", package = "DEbPeak") atac.df <- GetConsensusPeak(peak.file = atac.file) atac.anno <- AnnoPeak( peak.df = atac.df, species = "Mouse", seq.style = "UCSC", up.dist = 20000, down.dist = 20000 )
#> >> preparing features information... 2023-07-02 17时22分51秒 #> >> identifying nearest features... 2023-07-02 17时22分51秒 #> >> calculating distance from peak to TSS... 2023-07-02 17时22分52秒 #> >> assigning genomic annotation... 2023-07-02 17时22分52秒 #> >> adding gene annotation... 2023-07-02 17时22分54秒
#> 'select()' returned 1:many mapping between keys and columns
#> >> assigning chromosome lengths 2023-07-02 17时22分54秒 #> >> done... 2023-07-02 17时22分54秒
#> Warning: Removed 23 rows containing non-finite values (`stat_count()`).
# integrate chip.atac <- PeakbPeak(peak1.res = chip.anno$df, peak2.res = atac.anno$df, peak.mode = "consensus", peak.anno.key = "Promoter")