I'm very new to bioinformatics in general, and I'm trying to understand some basic concepts.

I have RNAseq data, and bioinformatics people tell me that intensities cannot be compared across patients. So there are all of these pipelines to compare intensities to Z scores--are those as simple as just plugging data into a bioconductor package?

It would be great to get some overview description of why Z values are important/why you can't compare intensities across patients, and/or some pointers towards any resources that I can read to learn more.

Thanks much for your time!

  • 3
    $\begingroup$ Your wording suggests that you have microarray data rather than RNAseq, is this correct? Z values are rarely used in RNAseq, rather counts per gene/feature or TPMs are typically used. $\endgroup$
    – Devon Ryan
    Jul 29 '17 at 6:50
  • $\begingroup$ I have some of both--even though I think I've seen Z-scores from TCGA illumna sets? Or perhaps I was mistaken. $\endgroup$ Jul 30 '17 at 3:08

It depends on what test or analysis you want to do, whether you need intensities (expression values) or z-scores.

If you want to do statistical analysis, such as finding differentially expressed genes between groups of patients (e.g., with limma), you don't want to use z-scores. But you use normalized intensities (for microarrays) or start with raw counts for RNAseq. Then follow the user guide (limma has a great user guide, also for starters).

For visualization in heatmaps or for other clustering (e.g., k-means, fuzzy) it is useful to use z-scores. Z-scores are a form of transformation (scaling), where every genes is sort of "reset" to the mean of all samples, using also the standard deviation. If you want to know exactly what a z-score is, a simple google search can tell you the details.

In R you can use the scale function for z-score transformation. Be aware that the function works on columns though. Which means you have to transpose your matrix first if genes are in the rows, and then transpose them back after transformation.

  • $\begingroup$ Rather than transposing the matrix I’d suggest using apply with scale. $\endgroup$ Jul 31 '17 at 11:51

In cancer genomics experiments often involve sequencing a large number of tumour samples, but few or no matched normals. This is partly due to financial constraints, but also due to ethical ones: it is easy to get ethical approval for tumour tissue, which is removed as a matter of course in a patient's care anyway, whereas it is hard to get approval for normal tissue, which would not normally be removed and would require an additional procedure.

However, this presents a problem. Most of the procedures we use in standard gene expression analysis involve comparing one group to another after suitable normalisations of the data. But here we have no suitable comparison group. To get around this problem in cancer RNA-seq analysis we do something called outlier detection. That is, we assume that for a given gene, the majority of the patients have "normal" expression, and look for the few patients that don't look like the rest. We do this with the Z-score.

To calculate the Z-score for an observation we subtract the mean of all observations and divide by the standard deviation. Thus the Z score of an observation is how many standard deviations an observation is from the mean of all observations - or how unusual it is.

Thus for Gene A in Patient 1, we calculate how many standard deviations Gene A is from the mean of Gene A across all patients. A very big (or small/negative) value tells us that the expression of Gene A is unusual in patient 1 compared to the other patients.

(NB: in some cancer studies they use the median and median absolute deviation rather than the mean and standard deviation to compute a "robust Z-score" as the data is unlikely to be normally distributed).

  • $\begingroup$ Interesting and well explained. Thanks. About the use of the median, I would add that this makes the results less sensitive to outliers. $\endgroup$
    – bli
    Aug 4 '17 at 9:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.