self-organizing map in R

July 19, 2012

[This article was first published on One Tip Per Day, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

This is my first SOM figure 🙂
Thanks to the som package and example code from Jun Yan. Here is my code for the figure:

rpkm <- Tx_rpkm[, -c(1:4)]
rpkm.f <- filtering(rpkm, lt=10, ut=30000, mmr=2, mmd=10)
# rpkm.f=log(rpkm.f+0.1) # this doesn’t really change much of the result
rpkm.f.n <- normalize(rpkm.f)
foo <- som(rpkm.f.n, xdim=5, ydim=5, topol=”rect”, neigh=”bubble”)
png(“../results/clustering.SOM.RNAseq.png”,width=800, height=800)
plot(foo,yadj=0.15, main=”Expression profiles obtained by self-organizing map (SOM) clustering \nof individual mRNA transcript throughout the time-course”, xlab=”Stage: D13 – D14 – D15 – D16 – D17 – D18″)
I am still not very clear how to choose the proper xdim and ydim. Also, what’s the color code for the bar mean?  Hope anyone know SOM could leave comment here. Or, I will read article myself 🙂
Is the normalization necessary?

To leave a comment for the author, please follow the link and comment on their blog: One Tip Per Day. offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Search R-bloggers


Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)