Question: How to visualize gene difference with PCA?
0
gravatar for carl.h
2.9 years ago by
carl.h10
carl.h10 wrote:

I am trying to visualize the gene expression difference between different samples. I am using edgeR to analyze rna-seq data. I have done PCA and MDS plots on the samples and the samples separate nicely into groups between treatments and time points. Now I would like to see how the genes separate on the same plot between samples. I would for example like to see if genes cluster with certain samples. I manage to create the PC plot with the help of prcomp() and use ggplot to visualize the data. Someone knows how I can do this?

rna-seq • 1.5k views
ADD COMMENTlink modified 2.9 years ago • written 2.9 years ago by carl.h10
1

I didn't understand what you're trying to achieve. Samples are plotted using vectors of values which in this case is gene expression level. Genes can be reduced in the same way to 2D (which is what PCA does) using the samples as the vector of values. Are you trying to plot both PCAs on the same grid?

ADD REPLYlink written 2.9 years ago by Asaf6.5k

Thank you for the answer, and if I am not that precise in my explanation, that is because I am a beginner in analyzing RNA-seq data. As I understand it the PCA data from prcomp() have the positions of the samples and also the vector directions of the genes. I have tried printing a biplot with both values. I want to see if I can explain the separation between the samples to specific genes and show it by for example printing all genes and the genes that goes to one axis cluster to one sample and the other sample has other gene clustered to them.

ADD REPLYlink written 2.9 years ago by carl.h10

Why can't you just color the points?

ADD REPLYlink written 2.9 years ago by khorms40

I can color the points to each sample if they have different timepoints and so on by adding different designs. But I don't know how I would do that to different genes which are expressed by several samples.

ADD REPLYlink written 2.9 years ago by carl.h10

samples separate nicely into groups between treatments and time points

Have you corrected for batch effects?

ADD REPLYlink written 2.9 years ago by PoGibas4.8k

No I have not corrected for batch effect. I have 4 biological replicates which I guess could be corrected, because they cluster slightly more than other parameters. The groups I am talking about is for example all samples at one timepoint cluster in one area and the other timepoint in the other.

ADD REPLYlink written 2.9 years ago by carl.h10
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2280 users visited in the last hour