ConductFE.Rd
Conduct Functional Enrichment Analysis.
ConductFE( deres, out.folder = NULL, data.type = c("RNA", "ChIP", "ATAC"), peak.anno.key = c("Promoter", "5' UTR", "3' UTR", "Exon", "Intron", "Downstream", "Distal Intergenic", "All"), signif = "padj", signif.threshold = 0.05, l2fc.threshold = 1, gene.key = NULL, gene.type = c("ENSEMBL", "ENTREZID", "SYMBOL"), org.db = "org.Mm.eg.db", enrich.type = c("ALL", "GO", "KEGG"), go.type = c("ALL", "BP", "MF", "CC"), enrich.pvalue = 0.05, enrich.qvalue = 0.05, organism = "mmu", 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 )
deres | Data frame contains all genes. |
---|---|
out.folder | Folder to save enrichment results. Default: wording directory. |
data.type | Input data type, choose from RNA, ChIP, ATAC. Default: RNA. |
peak.anno.key | Peak location, chosen from "Promoter", "5' UTR", "3' UTR", "Exon", "Intron", "Downstream", "Distal Intergenic","All". Default: "Promoter". |
signif | Significance criterion. For DESeq2 results, can be chosen from padj, pvalue. For edgeR results, can be chosen from FDR, PValue. Default: padj. |
signif.threshold | Significance threshold to get differentially expressed genes or accessible/binding peaks. Default: 0.05. |
l2fc.threshold | Log2 fold change threshold to get differentially expressed genes or accessible/binding peaks. Default: 1. |
gene.key | Column name in |
gene.type | Gene name type. Chosen from ENSEMBL, ENTREZID,SYMBOL. Default: ENSEMBL. |
org.db | Organism database. Default: org.Mm.eg.db. |
enrich.type | Enrichment type, chosen from ALL, GO, KEGG. Default: ALL. |
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. |
organism | Supported organism listed in 'http://www.genome.jp/kegg/catalog/org_list.html'. Default: mmu. |
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 list contains all results.
#>#>#>#> #>#>#> #>#> #>#>#> #> #> #> #> #> #> #> #> #> #> #> #> #> #> #>#>#> #>library(DEbPeak) count.file <- system.file("extdata", "snon_count.txt", package = "DEbPeak") meta.file <- system.file("extdata", "snon_meta.txt", package = "DEbPeak") count.matrix <- read.table(file = count.file, header = TRUE, sep = "\t") meta.info <- read.table(file = meta.file, header = TRUE) dds <- DESeq2::DESeqDataSetFromMatrix(countData = count.matrix, colData = meta.info, design = ~condition)#> Warning: some variables in design formula are characters, converting to factorskeep.genes <- rowSums(DESeq2::counts(dds, normalized = FALSE)) >= 10 dds <- dds[keep.genes, ] dds$condition <- relevel(dds$condition, ref = "WT") dds <- DESeq(dds)#>#>#>#>#>#>dds.results <- results(dds, contrast = c("condition", "KO", "WT")) dds.results.ordered <- dds.results[order(dds.results$log2FoldChange, decreasing = TRUE), ] ConductFE(deres = dds.results.ordered, signif = "pvalue", l2fc.threshold = 0.3)#>#>#>#> Warning: 25.28% of input gene IDs are fail to map...#>#>#>#>#>#>#>#> 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.#>#>#> Warning: 18.04% of input gene IDs are fail to map...#>#>#> NULL