how to plot PCA for microarray normalized data
1
0
Entering edit mode
5.4 years ago
raya.girish ▴ 30

Hi,

I have RMA normalised file from microarray gene chip I have 4 groups A,B,C,D(4 sample in group A , 5 sample in groups B, 3 samples in group C , 6 samples in group D) with 19K genes with there normalized value. I need to perform PCA over this data.

How should i proceed with this ? as i do not have raw file so i cannot perform using Limma or other bioconductor packages so i need some other R based package or other open source tool.

PCA • 5.0k views
ADD COMMENT
1
Entering edit mode
5.4 years ago
Benn 8.3k

You can import normalized values into limma, using ExpressionSet() https://www.bioconductor.org/packages/3.7/bioc/vignettes/Biobase/inst/doc/ExpressionSetIntroduction.pdf.

A PCA can be made in R with the prcomp() function https://stat.ethz.ch/R-manual/R-devel/library/stats/html/prcomp.html.

ADD COMMENT
0
Entering edit mode

Hi b.nota

Actually i am using new affyemtrix chip for which CDF file is not available so i was not looking for bioconductor packages otherwise it will ask me to import or provide CDF file

ADD REPLY
0
Entering edit mode

Did you look in the link I sent? I don't see anything about CDF file being necessary.

> exprsFile <- file.path(dataDirectory, "exprsData.txt")
> exprs <- as.matrix(read.table(exprsFile, header=TRUE, sep="\t",
+                               row.names=1,
+                               as.is=TRUE))

> minimalSet <- ExpressionSet(assayData=exprs)
ADD REPLY
0
Entering edit mode

Yes i saw that limma link ! Will the link which you sent me for PCA will it be able to give me PCA plot for 19K genes?

ADD REPLY
0
Entering edit mode

Let's show an example with random data, because I don't have your RMA values.

# Let's make a random matrix first
set.seed(11)
emptyMatrix <- matrix(nrow = 19000, ncol = 18)
randomMatrix <-apply(emptyMatrix, c(1,2), function(x) sample(c(1:16), 1)) 
colnames(randomMatrix) <- make.unique(c(rep("A", 4),rep("B", 5), rep("C", 3), rep("D", 6)))
rownames(randomMatrix) <- make.unique(rep("gene", 19000))

# Now lets make it into an ExpressionSet class
library(Biobase)
minimalSet <- ExpressionSet(assayData = randomMatrix)

# PCA for the genes
PCA_g <- prcomp(exprs(minimalSet))
plot(PCA_g$x[, 1:2])

# PCA for the samples
PCA_s <- prcomp(t(exprs(minimalSet)))
plot(PCA_s$x[, 1:2])
ADD REPLY

Login before adding your answer.

Traffic: 1604 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