Description Usage Arguments Value Author(s) Examples
The sampleList
function extracts the sample comparisons (contrasts)
from the CMAP annotation table and stores them as a list. The runLimma
function performs the actual DEG analysis with the limma
package for
all comparisons defined by sampleList
.
1 2 3 | sampleList(cmap, myby)
runLimma(df, comp_list, fdr = 0.05, foldchange = 1, verbose = TRUE, affyid=NULL)
|
df |
|
comp_list |
Sample comparison |
fdr |
FDR cutoff filter value on scale between 0 to 1. |
foldchange |
log2 fold change filter. |
affyid |
If |
verbose |
Function prints status output if |
cmap |
Input |
myby |
If |
Function sampleList
returns a list
of character
vectors.
If affyid=NULL
, the function runLimma
returns a list with the
following three components. DEG
: binary matrix where DEGs meeting the
cutoff settings are indicated by 1s; logFC
: matrix with corresponding
logFC values; FDR
matrix with corresponding FDR values. If affyid
is assigned a character vector of Affy IDs, then the function returns a list
containing for each treatment the topTable
output subsetted by the
corresponding Affy IDs.
Thomas Girke
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## Not run:
## Generate CEL file list for treatment vs. control comparisons
cmap <- read.delim("./data/cmap_instances_02.txt", check.names=FALSE)
comp_list <- sampleList(cmap, myby="CMP")
comp_list <- sampleList(cmap, myby="CMP_CELL") # includes cell type info
## Load normalized expression data
chiptype_dir <- unique(readRDS("./data/chiptype.rds"))
df1 <- readRDS(paste0("data/", chiptype_dir[1], "/", "all_mas5exprs.rds"))
df2 <- readRDS(paste0("data/", chiptype_dir[2], "/", "all_mas5exprs.rds"))
df3 <- readRDS(paste0("data/", chiptype_dir[3], "/", "all_mas5exprs.rds"))
affyid <- rownames(df1)[rownames(df1)
df <- cbind(df1[affyid,], df2[affyid,], df3[affyid,])
## DEG analysis with Limma
degMA <- runLimma(df, comp_list, fdr=0.10, foldchange=1, verbose=TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.