limma_deg.Rd
utility function to get differential expression table from limma function in limma package.
limma_deg(gex, label)
gex | A gene x sample data frame. rownames are gene or probe ids and colnames are sample ids. |
---|---|
label | A factor. Indicates class label of samples. It should be ordered as sample ids in gex data frame. |
DEG data frame which contains logFC, AveExpr, t, P.Value, adj.P.Val (by Benjamin-Hochberg correction)
Seongyong Park (2020-08-18)
gex = do.call(rbind, lapply(1:100, function(i) rnorm(100, sample(1:10), 2))) rownames(gex) = paste0("gid", 1:100) colnames(gex) = paste0("sid", 1:100) label = factor(c(rep("ALL", 50), rep("AML", 50)), levels=c("ALL", "AML")) head(limma_deg(gex, label))#> logFC AveExpr t P.Value adj.P.Val B #> gid34 0.8193437 5.657343 1.175512 0.2398186 0.9991119 -4.591372 #> gid48 -0.7666263 5.870307 -1.099878 0.2714122 0.9991119 -4.593108 #> gid12 -0.7661176 5.466124 -1.099148 0.2717304 0.9991119 -4.593124 #> gid14 -0.7638359 5.772627 -1.095875 0.2731605 0.9991119 -4.593197 #> gid58 -0.7562948 5.877817 -1.085055 0.2779238 0.9991119 -4.593435 #> gid90 0.7189914 5.168472 1.031536 0.3023148 0.9991119 -4.594577