Question: how to plot PCA for microarray normalized data
0
gravatar for raya.girish
3 months ago by
raya.girish20
raya.girish20 wrote:

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 • 215 views
ADD COMMENTlink modified 3 months ago by b.nota6.3k • written 3 months ago by raya.girish20
1
gravatar for b.nota
3 months ago by
b.nota6.3k
Netherlands
b.nota6.3k wrote:

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 written 3 months ago by b.nota6.3k

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 written 3 months ago by raya.girish20

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 modified 3 months ago • written 3 months ago by b.nota6.3k

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 written 3 months ago by raya.girish20

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 modified 3 months ago • written 3 months ago by b.nota6.3k
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: 1547 users visited in the last hour