LoadingGO.Rd
GO enrichment on PC loading genes.
LoadingGO( pca, pc = 1, gene.num = 200, out.folder = NULL, gene.type = c("ENSEMBL", "ENTREZID", "SYMBOL"), data.type = c("RNA", "ChIP", "ATAC"), peak.anno.key = c("Promoter", "5' UTR", "3' UTR", "Exon", "Intron", "Downstream", "Distal Intergenic", "All"), go.type = c("ALL", "BP", "MF", "CC"), enrich.pvalue = 0.05, enrich.qvalue = 0.05, org.db = "org.Mm.eg.db", 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 )
pca | PCA results of |
---|---|
pc | Selected PC. Default: 1. |
gene.num | Gene number to export for every PC. Default: 200. |
out.folder | Folder to save enrichment results. Default: wording directory. |
gene.type | Gene name type. Chosen from ENSEMBL, ENTREZID,SYMBOL. Default: ENSEMBL. |
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". |
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. |
org.db | Organism database. Default: org.Mm.eg.db. |
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(DESeq2) 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, ] pca_res <- PCA(deobj = dds, transform.method = "rlog")#>#>LoadingGO(pca_res, gene.type = "ENSEMBL", go.type = "BP", padj.method = "BH", save = TRUE)#>#>#>#>#>#>#>#>#>#> Warning: 2.5% of input gene IDs are fail to map...#>#>#> y is already present. #> y, which will replace the existing scale.#> NULL