Create Integrated Summary Plot.

PlotDEbPeak(
  de.peak,
  peak.type = c("ChIP", "ATAC", "Peak"),
  peak.mode = c("consensus", "diff"),
  gene.col = c("geneId", "ENSEMBL", "SYMBOL"),
  ...
)

Arguments

de.peak

Dataframe contains integrated results.

peak.type

The source of peaks, chosen from ATAC, ChIP and Peak (ChIP and ATAC). Default: ChIP.

peak.mode

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

gene.col

Column of inte.res contains genes. Same as merge.key in DEbPeak.

...

Parameters for ggvenn.

Value

A ggplot2 object.

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时23分15秒 #> >> preparing tag matrix... 2023-07-02 17时23分15秒 #> >> preparing start_site regions by ... 2023-07-02 17时23分15秒 #> >> preparing tag matrix... 2023-07-02 17时23分15秒 #> >> generating figure... 2023-07-02 17时23分22秒
#> >> done... 2023-07-02 17时23分22秒
#> >> binning method is used...2023-07-02 17时23分22秒 #> >> preparing start_site regions by gene... 2023-07-02 17时23分22秒 #> >> preparing tag matrix by binning... 2023-07-02 17时23分22秒 #> >> Running bootstrapping for tag matrix... 2023-07-02 17时23分30秒 #> >> binning method is used...2023-07-02 17时23分31秒 #> >> preparing body regions by gene... 2023-07-02 17时23分31秒 #> >> preparing tag matrix by binning... 2023-07-02 17时23分31秒 #> >> preparing matrix with extension from (TSS-20%)~(TTS+20%)... 2023-07-02 17时23分31秒 #> >> 1 peaks(0.1536098%), having lengths smaller than 800bp, are filtered... 2023-07-02 17时23分34秒 #> >> Running bootstrapping for tag matrix... 2023-07-02 17时24分14秒
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时24分15秒 #> >> identifying nearest features... 2023-07-02 17时24分15秒 #> >> calculating distance from peak to TSS... 2023-07-02 17时24分15秒 #> >> assigning genomic annotation... 2023-07-02 17时24分15秒 #> >> adding gene annotation... 2023-07-02 17时24分18秒
#> 'select()' returned 1:many mapping between keys and columns
#> >> assigning chromosome lengths 2023-07-02 17时24分18秒 #> >> done... 2023-07-02 17时24分18秒
#> 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!
# DE and ChIP venn plot debchip.plot <- PlotDEbPeak( de.peak = debchip.res, peak.type = "ChIP", gene.col = "SYMBOL", show_percentage = FALSE )
#> Warning: 条件的长度大于一,因此只能用其第一元素
#> Warning: 条件的长度大于一,因此只能用其第一元素