> BiocManager::install("Biobase", version = "3.8")
> library("Hiiragi2013")
> data("x")
> dim(Biobase::exprs(x))
> selectedProbes = c( Fgf4 = "1420085_at", Gata4 = "1418863_at",
+ Gata6 = "1425463_at", Sox2 = "1416967_at")
> library("reshape2")
> genes = melt(Biobase::exprs(x)[selectedProbes, ],
+ varnames = c("probe", "sample"))
> head(genes)
probe sample value
1 1420085_at 1 E3.25 3.027715
2 1418863_at 1 E3.25 4.843137
3 1425463_at 1 E3.25 5.500618
4 1416967_at 1 E3.25 1.731217
5 1420085_at 2 E3.25 9.293016
6 1418863_at 2 E3.25 5.530016
> genes$gene =
names(selectedProbes)[match(genes$probe, selectedProbes)]
> head(genes)
probe sample value gene
1 1420085_at 1 E3.25 3.027715 Fgf4
2 1418863_at 1 E3.25 4.843137 Gata4
3 1425463_at 1 E3.25 5.500618 Gata6
4 1416967_at 1 E3.25 1.731217 Sox2
5 1420085_at 2 E3.25 9.293016 Fgf4
6 1418863_at 2 E3.25 5.530016 Gata4
> library("Hmisc")
> ggplot(genes, aes( x = gene, y = value, fill = gene)) +
+ stat_summary(fun.y = mean, geom = "bar") +
+ stat_summary(fun.data = mean_cl_normal, geom = "errorbar",
+ width = 0.25)
![](https://img.haomeiwen.com/i6223615/896acf44ff71340b.png)
image.png
网友评论