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
)

Arguments

pca

PCA results of PCA.

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.

Value

If save is TRUE, return NULL (all results are in out.folder), else retutn list contains all results.

Examples

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 factors
keep.genes <- rowSums(DESeq2::counts(dds, normalized = FALSE)) >= 10 dds <- dds[keep.genes, ] pca_res <- PCA(deobj = dds, transform.method = "rlog")
#> Differential expression analysis with DESeq2!
#> Use all genes for PCA!
LoadingGO(pca_res, gene.type = "ENSEMBL", go.type = "BP", padj.method = "BH", save = TRUE)
#> Selecting by Loadding
#> Selecting by Loadding
#> Convert ENSEMBL to ENTREZID!
#> 'select()' returned 1:1 mapping between keys and columns
#> conduct BP GO enrichment analysis.
#> wrong orderBy parameter; set to default `orderBy = "x"`
#> Scale for y is already present. #> Adding another scale for y, which will replace the existing scale.
#> Convert ENSEMBL to ENTREZID!
#> 'select()' returned 1:many mapping between keys and columns
#> Warning: 2.5% of input gene IDs are fail to map...
#> conduct BP GO enrichment analysis.
#> wrong orderBy parameter; set to default `orderBy = "x"`
#> Scale for y is already present. #> Adding another scale for y, which will replace the existing scale.
#> NULL