Extract Differential Analysis Results.

ExtractDA(
  deres,
  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
)

Arguments

deres

Data frame contains all genes/peaks.

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.

Value

A data frame.

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, ] dds$condition <- relevel(dds$condition, ref = "WT") dds <- DESeq(dds)
#> estimating size factors
#> estimating dispersions
#> gene-wise dispersion estimates
#> mean-dispersion relationship
#> final dispersion estimates
#> fitting model and testing
dds.results <- results(dds, contrast = c("condition", "KO", "WT")) dds.results.ordered <- dds.results[order(dds.results$log2FoldChange, decreasing = TRUE), ] dds.degs <- ExtractDA( deres = dds.results.ordered, signif = "padj", signif.threshold = 0.05, l2fc.threshold = 1 )
#> Differential expression analysis with DESeq2!