| as_genes | R Documentation |
Select the genes passing an adjusted-p-value cut-off (optionally
split by direction of change) from a DESeq2 analysis, as a
character vector of gene identifiers for ora.
as_genes(
x,
cutoff = 0.05,
direction = c("both", "up", "down"),
minAbsLFC = 0,
...
)
## S3 method for class 'DESeqResults'
as_genes(
x,
cutoff = 0.05,
direction = c("both", "up", "down"),
minAbsLFC = 0,
...
)
## S3 method for class 'DESeqDataSet'
as_genes(
x,
cutoff = 0.05,
direction = c("both", "up", "down"),
minAbsLFC = 0,
...
)
x |
a |
cutoff |
numeric, adjusted p-value cut-off (default 0.05); genes
with |
direction |
character, |
minAbsLFC |
numeric, keep only significant genes with
|
... |
additional arguments; for a |
Selection uses padj < cutoff on the padj
column as produced by DESeq2::results()
(which includes independent filtering). minAbsLFC is a
post-hoc filter applied to the reported log2FoldChange; it
does not change the underlying test. To test against a minimum
effect size, set lfcThreshold in results() /
DESeq2::results() instead.
A character vector of gene identifiers (empty if no gene passes, with a warning).
library(DESeq2)
dds <- makeExampleDESeqDataSet(n = 500)
isB <- colData(dds)$condition == "B"
ct <- counts(dds)
ct[1:60, isB] <- ct[1:60, isB] * 5 + 500
storage.mode(ct) <- "integer"
counts(dds) <- ct
dds <- DESeq(dds, quiet = TRUE)
up_genes <- as_genes(dds, contrast = c("condition", "B", "A"), direction = "up")
gene_sets <- list(
SET1 = paste0("gene", 1:50),
SET2 = paste0("gene", 201:260)
)
res <- ora(gene = up_genes, gene_sets = gene_sets, universe = rownames(dds))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.