Blog Archives

How to correctly set color in the image() function?

May 15, 2015
By

Sometimes we want to make our own heatmap using image() function. I recently found it's tricky to set the color option there, as its manual has very little information on col:cola list of colors such as that generated by rainbow, heat.colors,...

Read more »

Tips and Tools you may need for working on BIG data

May 8, 2015
By

Nowadays everyone is talking about big data. As a genomic scientist, I could feel hungry of a collection of tools more specialized for the mediate-to-big data we deal everyday.Here are some tips I found useful when getting, processing or visualizing la...

Read more »

X11 connection error in Mac

March 11, 2015
By

Typically, I log into my remote server/cluster via "ssh -X" and from there launch R program for plotting. But it always shows an error asunable to open connection to X11 display ''after a while, when you want to call functions such as plot(). This is very annoying. So that I have to exit the server and re-login again. Does this sound...

Read more »

reshape: from long to wide format

February 26, 2015
By
reshape: from long to wide format

This is to continue on the topic of using the melt/cast functions in reshape to convert between long and wide format of data frame. Here is the example I found helpful in generating covariate table required for PEER (or Matrix_eQTL) analysis:Here ...

Read more »

How to draw venn pie-agram (multi-layer pie chart) in R?

September 25, 2014
By
How to draw venn pie-agram (multi-layer pie chart) in R?

I was wondering how to draw a venn diagram like pie chart in R, to show the distribution of my RNA-seq reads mapped onto different annotation regions (e.g. intergenic, intron, exons etc.). A google search returns several options, including the nice one...

Read more »

best note on reshape2

July 15, 2014
By

I found this elegant note about reshape2 from Sean Anderson's blog:http://seananderson.ca/2013/10/19/reshape.html

Read more »

Access Google Spreadsheet directly in bash and in R

January 31, 2014
By

Google Doc is a good way to share/manage documents between you and your colleagues, but sometime you want to directly access the data in terminal (e.g. bash) or in program (e.g. R), without downloading the data first. For example, I have a Google Spre...

Read more »

How to see source code of a function/method in R?

January 15, 2014
By

If it's an internal function of R (e.g. from base package), just type the function name, like> rowMeansfunction (x, na.rm = FALSE, dims = 1L) {    if (is.data.frame(x))         x <- as.matrix(x)  &nbsp...

Read more »

R / Bioconductor for High-Throughput Sequence Analysis

December 6, 2013
By

I would like to recommend a recent workshop material on R/Bioconductor from Marc Carlson et al.http://www.bioconductor.org/help/course-materials/2013/SeattleMay2013/PDF: IntermediateSequenceAnalysis2013.pdfR script: IntermediateSequenceAnalysis201...

Read more »

Google Developers R Programming Video Lectures

August 8, 2013
By

I got this Google Developers R Programming Video Lectures from Stephen's blog - Getting Genetics Done.Very useful R tutorial for beginner! Short and efficient. Here is what I learned after watching the lectures:4.3 - Add a Warning or Stop the Func...

Read more »