edger_to_df | R Documentation |
Create a data.frame from an edgeR
results object. This function calls
edgeR::topTags()
on the object and extracts the table
data.frame
with all features. This function returns all rows unsorted by default
i.e. topTags(..., n=Inf, sort.by="none")
.
edger_to_df(x, ...)
x |
|
... |
Additional arguments passed to |
data.frame
library(edgeR)
library(coriell)
# create some fake data
x <- data.frame(
ctl1 = rnbinom(1000, size = 0.4, prob = 1e-5),
ctl2 = rnbinom(1000, size = 0.4, prob = 1e-5),
trt1 = rnbinom(1000, size = 0.4, prob = 1e-5),
trt2 = rnbinom(1000, size = 0.4, prob = 1e-5),
row.names = paste0("gene", 1:1000)
)
# run edger pipeline
group <- factor(c(1, 1, 2, 2))
y <- DGEList(counts = x, group = group)
y <- calcNormFactors(y)
design <- model.matrix(~group)
y <- estimateDisp(y, design)
# To perform quasi-likelihood F-tests:
fit <- glmQLFit(y, design)
qlf <- glmQLFTest(fit, coef = 2)
# convert the results object to a dataframe -- do not filter the results
res_df <- edger_to_df(qlf)
head(res_df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.