getDEGs | R Documentation |
This function parses an object of class TopTags
, DGEExact
or DGELRT
from edgeR or DESeqResults
class from DESeq2, and returns
the differentially expressed genes (DEGs) that passed the specified
thresholds.
getDEGs(
object,
direction = "both",
fdr = 0.05,
logfc = c(0, 0),
max = 1000,
column_by = NULL
)
object |
An object of class |
direction |
A string indicating the directionality of expression
changes of DEGs to retreive. Allowable character values are |
fdr |
A numeric scalar indicating the FDR threashold used to select DEGs. Default is 0.05. |
logfc |
A numeric scalar indicating the logFC cutoffs used to select
DEGs. Default is |
max |
An integer scalar indicating the maximum number of DEGs to return. Default is 1000. |
column_by |
A string indicating the column name containing the gene
symbols or IDs in the input |
The function parses the standard output objects from edgeR and
DESeq2 to selects DEGs that "passed" the fdr
, logfc
and max
threshold.
The accapted class types includes:
DGEExact
, returned by exactTest()
from edgeR.
DGELRT
, returned by glmLRT()
, glmTreat()
or glmQLFTest()
from edgeR.
TopTags
, returned by topTags()
from edgeR.
DESeqResults
returned by results()
from DESeq2.
By specifying direction
, the function selects DEGs with a positive and
negative logFC when direction = "both"
(default), only positive logFC when
direction = "up"
, and only negative logFC when direction = "down"
.
A character vector
I-Hsuan Lin
edgeR::exactTest()
, edgeR::glmLRT()
, edgeR::glmTreat()
,
edgeR::glmQLFTest()
, edgeR::topTags()
, DESeq2::results()
# Load demo dataset
data(res_deseq2)
data(res_edger)
# Retrieve first 250 up-regulated DEGs from DESeq2's output,
# return rownames (Ensembl ID)
getDEGs(res_deseq2, direction = "up", max = 250)
# Retrieve first 1000 DEGs at FDR = 10% from edgeR's output,
# return values from the `external_gene_name` column (Gene Symbol)
getDEGs(res_edger, fdr = 0.1, column_by = "external_gene_name")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.