Hi,
I want to boxplot a selected gene accross 12 arrays, so i have to get 12 boxplot which shows my selected genes expression. Im using hugene 2.0. How can i do it??
Thanks,
Anna
Hi,
I want to boxplot a selected gene accross 12 arrays, so i have to get 12 boxplot which shows my selected genes expression. Im using hugene 2.0. How can i do it??
Thanks,
Anna
Hi Anna,
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:
boxplot(y1$counts["Idh2",]~y1$samples$group)
Where y1$counts
is your matrix, and ["Idh2"]
is your gene of interest. The factor with your groups is after ~
I hope this works for you!
Ben
This is from an article...
http://www.frontiersin.org/files/Articles/102522/fimmu-05-00375-HTML/image_m/fimmu-05-00375-g005.jpg
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 [1] "CD34" "CD34" "iNS" "iNS" "iNS" "iNS/iPSC" [7] "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[2], " 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[2], " expression values"))) > g
Dear James,
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
And i have to get all the genesymbolnames in a vector, so who uses the script it can boxplot probe which ever he/she wants
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Nice! Glad to see you got things working.