InteFE.Rd
GO Enrichment on Integrated Results.
InteFE( inte.res, fe.key, inte.type = c("DEbPeak", "PeakbPeak", "DEbDE"), out.folder = NULL, gene.type = c("ENSEMBL", "ENTREZID", "SYMBOL"), 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 )
inte.res | Integration results, can be output of |
---|---|
fe.key | The key type of integrated results ("Type" column of |
inte.type | The integration type, choose from "DEbDE", "PeakbPeak", "DEbPeak". Default: "DEbPeak". |
out.folder | Folder to save enrichment results. Default: wording directory. |
gene.type | Gene name type (if |
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) #### RNA-seq and RNA-seq rna.diff.file <- system.file("extdata", "RA_RNA_diff.txt", package = "DEbPeak") de1.res <- read.table(file = rna.diff.file, header = TRUE, sep = "\t") de2.res <- read.table(file = rna.diff.file, header = TRUE, sep = "\t") # use same file as example de.de <- DEbDE(de1.res = de1.res, de2.res = de2.res, de1.l2fc.threshold = 0.5, de2.l2fc.threshold = 1)#>#>de.de.fe <- InteFE( inte.res = de.de, fe.key = "Down_Down", inte.type = "DEbDE", gene.type = "SYMBOL", go.type = "BP", species = "Mouse", save = F )#>#>#> Warning: 5.76% of input gene IDs are fail to map...#>#>#>#### peak-related and peak-related # 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时16分48秒 #> >> identifying nearest features... 2023-07-02 17时16分48秒 #> >> calculating distance from peak to TSS... 2023-07-02 17时16分49秒 #> >> assigning genomic annotation... 2023-07-02 17时16分49秒 #> >> adding gene annotation... 2023-07-02 17时16分50秒#>#> >> assigning chromosome lengths 2023-07-02 17时16分50秒 #> >> done... 2023-07-02 17时16分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时16分52秒 #> >> identifying nearest features... 2023-07-02 17时16分52秒 #> >> calculating distance from peak to TSS... 2023-07-02 17时16分52秒 #> >> assigning genomic annotation... 2023-07-02 17时16分52秒 #> >> adding gene annotation... 2023-07-02 17时16分54秒#>#> >> assigning chromosome lengths 2023-07-02 17时16分54秒 #> >> done... 2023-07-02 17时16分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") # functional enrichment chip.atac.fe <- InteFE( inte.res = chip.atac, fe.key = "Common", inte.type = "PeakbPeak", gene.type = "SYMBOL", go.type = "BP", species = "Mouse", save = FALSE )#>#>#> Warning: 0.61% of input gene IDs are fail to map...#>#>#> y is already present. #> y, which will replace the existing scale.#### RNA-seq and peak-related 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时17分06秒 #> >> preparing tag matrix... 2023-07-02 17时17分06秒 #> >> preparing start_site regions by ... 2023-07-02 17时17分06秒 #> >> preparing tag matrix... 2023-07-02 17时17分06秒 #> >> generating figure... 2023-07-02 17时17分15秒#> >> done... 2023-07-02 17时17分15秒#> >> binning method is used...2023-07-02 17时17分15秒 #> >> preparing start_site regions by gene... 2023-07-02 17时17分15秒 #> >> preparing tag matrix by binning... 2023-07-02 17时17分15秒 #> >> Running bootstrapping for tag matrix... 2023-07-02 17时17分23秒 #> >> binning method is used...2023-07-02 17时17分24秒 #> >> preparing body regions by gene... 2023-07-02 17时17分24秒 #> >> preparing tag matrix by binning... 2023-07-02 17时17分24秒 #> >> preparing matrix with extension from (TSS-20%)~(TTS+20%)... 2023-07-02 17时17分24秒 #> >> 1 peaks(0.1536098%), having lengths smaller than 800bp, are filtered... 2023-07-02 17时17分27秒 #> >> Running bootstrapping for tag matrix... 2023-07-02 17时18分08秒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时18分09秒 #> >> identifying nearest features... 2023-07-02 17时18分09秒 #> >> calculating distance from peak to TSS... 2023-07-02 17时18分09秒 #> >> assigning genomic annotation... 2023-07-02 17时18分09秒 #> >> adding gene annotation... 2023-07-02 17时18分12秒#>#> >> assigning chromosome lengths 2023-07-02 17时18分12秒 #> >> done... 2023-07-02 17时18分12秒#> 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 <- InteFE( inte.res = debchip.res, fe.key = "UPbPeak", inte.type = "DEbPeak", gene.type = "ENTREZID", 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.#>#> y is already present. #> y, which will replace the existing scale.