You'll need to define your groups first in a factor. So which array is in which group? Because I assume that your exp. contains replicates, and I guess you want to see in a boxplot how the variation is between your replicates for this gene?
If you have your groups in a factor and your normalized data is in a matrix (with rownames), try the following:
y1$counts is your matrix, and
I hope this works for you!
This is from an article...
I want to do the same with one gene...
I'll just show you how to do it, and your homework is to look up all the functions I use and try to understand what I am doing.
> gnstoget <- c("INTS7","F5","PBX1","CACYBP","NENF", "ANGEL2","COX6A2") > mapper <- select(hugene20sttranscriptcluster.db, gnstoget, "PROBEID","SYMBOL") Warning message: In .generateExtraRows(tab, keys, jointype) : 'select' resulted in 1:many mapping between keys and return rows > mapper SYMBOL PROBEID 1 INTS7 16699021 2 F5 16696187 3 PBX1 16673191 4 PBX1 16673229 5 CACYBP 16674089 6 NENF 16677259 7 ANGEL2 16699138 8 COX6A2 16826010 > mapper <- mapper[-4,] ## randomly take just one of the dups for PBX1
Get the data from your ExpressionSet
> mat <- t(exprs(eset)[as.character(mapper$PROBEID),]) > colnames(mat) <- as.character(mapper$SYMBOL)
You need a vector of sample types - you will need something that matches your samples. Here are the cell types from the GEO data I got.
> Cell  "CD34" "CD34" "iNS" "iNS" "iNS" "iNS/iPSC"  "iNS/iPSC" "NPC" "NPC" "NPC" "NPC" > d.f <- data.frame(Cell, mat) > library(reshape) > library(ggplot2) > d.f2 <- melt(d.f, id.vars = "Cell") > g <- ggplot(d.f2, aes(x = Cell, y = value)) + geom_boxplot() + facet_wrap(~variable) + ylab(expression(paste(log, " expression values"))) > g
For one gene
> g <- ggplot(d.f2[d.f2$variable == "INTS7",], aes(x = Cell, y = value)) + geom_boxplot() + facet_wrap(~variable) + ylab(expression(paste(log, " expression values"))) > g
Thank you for your answer, and i forgot an information what if i have 3 biological repeats, do i have to do lmfit, to merge a celllines 3 results into one column?? And what if I already merged the annotation table with expr table? How can i continue?
Thank you Anna