Hi,
I only have RPKM data from RNA-seq now, and want to make it for hierarchical clustering.
My question is whether I need to apply the log transformation for the RPKM data before the clustering? or I can directly calculate the zscore for the data to do clustering.
I have this question because I think the goal for log transformation is to scale the ratio of change, especially for microarray data. Since the data I have now is not a ratio, I think maybe no need to do this transformation.
regards,
Simon
2 answers
The choice may depend on why you are clustering it. I find that mean centering the data and representing it as z-scores (also called scaling the data) as you mentioned, is a generally useful way to group genes with common behaviors. There's a function in R called: scale() that does this. Though beware as it scales columns by default so you have to wrap your call in t() to transpose it.
Log in to answer this question.
How do you cluster? How do you measure distance? The log transformation might have no effect or it might be crucial depending on the distance function.
After you cluster, try to look for batch effect, I'm curious how the experiment might influence the data.
I used hierarchical average linkage clustering using Euclidean distance by Cluster 3.0.