Question: how to plot PCA for microarray normalized data
0
Entering edit mode
9 months ago
raya.girish • 20

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.

ADD COMMENTlink 9 months ago raya.girish • 20 • updated 9 months ago Benn 6.9k
1
Entering edit mode
9 months ago
Benn 6.9k
Netherlands

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 COMMENTlink 9 months ago Benn 6.9k
Entering edit mode
0

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 REPLYlink 9 months ago
raya.girish
• 20
Entering edit mode
0

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 REPLYlink 9 months ago
Benn
6.9k
Entering edit mode
0

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 REPLYlink 9 months ago
raya.girish
• 20
Entering edit mode
0

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 REPLYlink 9 months ago
Benn
6.9k

Login before adding your answer.

Powered by the version 1.5