how to automate microarray data analysis
1
0
Entering edit mode
7.1 years ago
raya.girish ▴ 40

Dear all i am not good programmer so if this is silly question please bear I have certain set of microarray affymetrix data (U133a2 chip). I know this is very old data . But it came for analysis in my hand i have 4 control and 208 test sample I have to perform All control vs one test each Control vs test1 Control vs test2 so on..

This is my pipleine

mas.norm=mas5(raw.data)

mas.exprs=exprs(mas.norm)

exprSet = log(mas.exprs, 2)

exprSet **# The expreset is having expression value for all samples. Also the sample is randomly put in column of exprset so no control are together it is like test1 test2 control1 control2 test3 test4 test5 tes6 control3 test7 test8 control9 and so on...** 

control= apply(exprSet[, c("control1","control2","control3","control4")], 1, mean)

**test1<-exprSet[,1]

**test1_control = test1 - control**

The bold letter step i have to automate. Idont want to write 208 time the above step so was looking for automations

Such that new file will have test1_control , test2_control ,test3_control vs test212_control

Kindly help

microarray affymetrix automation • 2.0k views
ADD COMMENT
0
Entering edit mode

Check out the Limma package

ADD REPLY
0
Entering edit mode

Hi I only need to automate above step

ADD REPLY
0
Entering edit mode
7.1 years ago

You need to check some basic programming tutorials about for/while cycles. This is key to use any type of (pseudo)-programming language.

This being said, you can do something like this (I have not checked if it actually works because you did not provide data):

# Removes the control columns
exprSet2 = exprSet[, !(colnames(exprSet) %in% c("control1","control2","control3","control4"))]

# Empty dataframe for the results
results = data.frame(matrix(NA, nrow = ncol(exprSet2), ncol = nrow(exprSet2) + 1))
colnames(results) = c("test_name", rownames(exprSet2))

# For each column in exprSet, excluding the controls
for(i in 1:nrow(results)){
    test = exprSet2[, i] - control
    results[i, ] = c(paste("test", i, "_control", sep = ""), test)
}

print(results)
ADD COMMENT
0
Entering edit mode

Hi Selenocysteine No its not working I have 212 sample in which there are 4 control and 208 test. This value are MAS nomalisaed and log2 tranformed values What i need to do is Test1-Control calculation for analysing DGE so i cant repeat 208 time Test1-Control ... Test208-Control

So i want the code to do this automatically

ADD REPLY

Login before adding your answer.

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