library(lattice)
prDat <- read.table("GSE4051_data.tsv")
str(prDat, max.level = 0)
## 'data.frame': 29949 obs. of 39 variables:
prDes <- readRDS("GSE4051_design.rds")
set.seed(987)
(theGene <- sample(1:nrow(prDat), 1))
## [1] 14294
pDat <- data.frame(prDes, gExp = unlist(prDat[theGene, ]))
aggregate(gExp ~ gType * devStage, pDat, FUN = mean)
## gType devStage gExp
## 1 wt E16 10.243
## 2 NrlKO E16 9.664
## 3 wt P2 9.688
## 4 NrlKO P2 9.686
## 5 wt P6 9.846
## 6 NrlKO P6 9.608
## 7 wt P10 9.473
## 8 NrlKO P10 9.405
## 9 wt 4_weeks 9.543
## 10 NrlKO 4_weeks 9.430
stripplot(gType ~ gExp, pDat)
keepGenes <- c("1431708_a_at", "1424336_at", "1454696_at", "1416119_at", "1432141_x_at",
"1429226_at")
miniDat <- subset(prDat, rownames(prDat) %in% keepGenes)
miniDat <- data.frame(gExp = as.vector(t(as.matrix(miniDat))), gene = factor(rep(rownames(miniDat),
each = ncol(miniDat)), levels = keepGenes))
miniDat <- suppressWarnings(data.frame(prDes, miniDat))
stripplot(gType ~ gExp | gene, miniDat, scales = list(x = list(relation = "free")),
group = gType, auto.key = TRUE)