DEbPeakFE.Rd
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 )
de.peak | Dataframe contains integrated results. |
---|---|
peak.fe.key | The key type of integrated results ("Type" column of |
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. |
If save
is TRUE, return NULL (all results are in out.folder
), else retutn result dataframe.
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秒#>#> >> 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)#>#>#>#>#>#># 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" )#># functional enrichment on UPbPeak genes upbpeak.fe.results <- DEbPeakFE( de.peak = debchip.res, peak.fe.key = "UPbPeak", species = "Mouse", save = FALSE )#>#>#>#>#> y is already present. #> y, which will replace the existing scale.#>#> y is already present. #> 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 )#>#>#> y is already present. #> y, which will replace the existing scale.#>#> y is already present. #> y, which will replace the existing scale.