block analysis in Limma
0
0
Entering edit mode
suri ghani ▴ 40
@suri-ghani-4809
Last seen 9.7 years ago
Hi everyone, I am new to microarray data analysis. Please evaluate the following code for  block analysis in Limma and let me know about whether this code is appropriate??. library(limma) eset<-read.table("RMANormData_apap.txt") design <- model.matrix(~ -1+factor(c(1,1,1,2,2,2,3,3,3,4,4,4,5,5,5,6,6,6))) colnames(design) <- c("control3", "control24", "low3","high3","low24","high24") contrast.matrix <- makeContrasts(high3-control3,high24-control24,low3- control3,low24-control24 , levels=design) sample<-read.table("sample.txt",sep="\t",as.is=T,h=T) corfit<-duplicateCorrelation(eset,design,ndups=1,block=sample[,3]) fit<-lmFit(eset,design,block=sample[,3],cor=corfit$consensus) fit2<-contrasts.fit(fit,contrast.matrix) fit2<-eBayes(fit2) topTable(fit2, coef=1, adjust="fdr", sort.by="B", number=10) results <- decideTests(fit2,adjust.method="BH",method="separate",lfc=1, p.value=0.05); The input table RMANormData_apap.txt containing the expression values of the genes includes the following columns: c_3_1  c_3_2  c_3_3  c_24_1  c_24_2  c_24_3   t_1l_3h_1    t_1l_3h_2 t_1l_3h_3  t_5l_3h_1    t_5l_3h_2  t_5l_3h_3  t_1l_24h_1  t_1l_24h_2 t_1l_24h_3 t_5l_24h_1    t_5l_24h_2  t_5l_24h_3 the input file sample.txt contains the following information: Sample Group      Block c_3_1control3        1 c_3_2control3        2 c_3_3control3        3 c_24_1control24        1 c_24_2control24        2 c_24_3control24        3 t_1l_3h_1 low3                1 t_1l_3h_2 low3           2 t_1l_3h_3 low3                3 t_5l_3h_1 high3                1 t_5l_3h_2high3                2 t_5l_3h_3high3                3 t_1l_24h_1low24         1 t_1l_24h_2low24         2 t_1l_24h_3low24         3 t_5l_24h_1high24         1 t_5l_24h_2high24         2 t_5l_24h_3high24         3since the experiment is performed using  3 rats block factor in included. Regards, Sri [[alternative HTML version deleted]]
Microarray limma Microarray limma • 792 views
ADD COMMENT

Login before adding your answer.

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