PCA analysis of the RNASeq data
1
0
Entering edit mode
Emily • 0
@emily-8166
Last seen 9.5 years ago
United States

Hi everyone,

I am doing a PCA analysis with my RNASeq data and I want to konw whether the genotypes have a great effect on the gene expression. I have four genotypes :G0(wild type),G1,G2,G3 and three time points: T1,T2,T3. All the values in the dataset are Log2FC values compared to wild type. The data looks like this:

Gene  Genotype  T1   T2   T3
a1 G1 . . .
a2 G1 . . .
a3 G1 . . .
a4 G1 . . .
a5 G1 . . .
a6 G1 . . .
a7 G1 . . .
a8 G1 . . .
a9 G1 . . .
a10 G1 . . .
a1 G2 . . .
a2 G2 . . .
a3 G2 . . .
a4 G2 . . .
a5 G2 . . .
a6 G2 . . .
a7 G2 . . .
a8 G2 . . .
a9 G2 . . .
a10 G2 . . .
a1 G3 . . .
a2 G3 . . .
a3 G3 . . .
a4 G3 . . .
a5 G3 . . .
a6 G3 . . .
a7 G3 . . .
a8 G3 . . .
a9 G3 . . .
a10 G3 . .

.After the PCA analysis,

all the dots red, blue and green (represent three different genotypes ) are stacked together, they are not clustered according to genotypes. I am not sure this is what it is or there is something wrong with my data format.  

Thanks for your help in advance.

rnaseq R • 1.7k views
ADD COMMENT
0
Entering edit mode

What do the dots mean in your description of the data? What commands did you use to generate the PCA plot? Can you give us a picture of what the PCA plot actually looks like?

ADD REPLY
0
Entering edit mode
Emily • 0
@emily-8166
Last seen 9.5 years ago
United States

Hi Aaron, thanks for your reply. The dot in my description of the data means the value, I did not give the actual value for each datapoint, just use dot instead.

The command I used to generate the PCA plot is as follows:

library(psych)
library(GPArotation)
data = read.table("C:\\Users\\Desktop\\PCA\\log2FC.csv", header=T, sep = ",")
attach(data)
str(data)
Datax = prcomp(data[,-1], retx=TRUE, center=TRUE,scale= TRUE)
str(Datax)
summary(Datax)
scores <- Datax$x
scores
sd <- Datax$sdev
loadings <- Datax$rotation
loadings[1:3,]
write.csv(loadings, "C:\\Users\\Desktop\\PCA\\pca.csv")
g <- ggbiplot(Datax,groups=Genotype,var.axes=FALSE,scale=1)
print(g)

Following is the picture of the PCA plot

ADD COMMENT
0
Entering edit mode

The picture isn't showing up. But more importantly, it doesn't seem like any of the code you're using involves Bioconductor packages (see A: Error in PCA analysis and with ggbiplot function for an answer to a related question). If I were you, I'd direct my queries towards the developer of ggbiplot.

ADD REPLY

Login before adding your answer.

Traffic: 615 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6