I apologize for my naiveté but I'm fairly new to R and very new to limma. My overall research question is to determine whether or not there is a difference in gene expression between post-intervention and pre-intervention of a group of patients. I wanted to adjust for potential confounding covariates such as contamination of the sample from white blood cells which I had arrived at by creating two variables that represent leukocytes and smooth muscle cells. I derived these variables by taking the expression level at probe sets coding for the genes to those leukocytes and muscle cells and averaged those expressions into these two variables.
I ran the following workflow:
e<-justRMA(filenames=celList, destructive=TRUE)
d<-read.table("expressionDataHFNIH1-14-15.txt", header=T, row.names=1)
names(d)<-gsub(".CEL", "", gsub("X", "", names(d)))
d<-round(d, 5)
design <- cbind(ID = c(1,1,2,2,7,7,8,8,9,9,10,10,11,11,14,14,16,16,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,30,30,33,33,34,34,35,35,36,36,37,37,39,39,40,40,41,41), Congestion=c(1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2), cd45=c(5.8431,9.34022,5.84936,8.48469,5.74679,9.746,7.02528,8.01279,4.51826,7.92241,7.11258,3.98122,4.93983,8.25378,10.11714,9.12532,8.99222,8.54245,7.43757,7.89494,7.0255,7.84656,5.75105,6.3731,6.57053,7.33729,9.04808,9.76327,3.95987,5.83226,7.86699,6.61648,5.62214,8.24516,6.14157,5.0675,4.36437,5.97211,5.75741,6.45735,5.44796,5.41904,4.62525,4.23153,3.99304,5.48816,4.92795,4.86038,6.67107,3.56441,3.96629,7.23041,4.7075,7.74862,4.7599,8.1618), SMC=c(6.10775,7.63237,6.44302,6.76774,6.37873,6.39852,5.65846,6.52086,6.46114,6.68354,6.32257,5.53346,5.39986,5.88007,6.43321,5.02119,6.38468,6.69504,11.59846,5.77372,6.32704,5.95683,5.25758,6.0633,8.6829,7.57135,7.10109,5.19097,3.95233,4.69579,5.3558,5.7178,5.82353,5.80212,6.49176,5.10923,5.04173,3.65802,5.43176,4.67313,6.26439,5.12875,12.18113,5.30599,5.87447,5.10515,6.43704,7.01435,6.14525,6.58549,7.33405,6.06033,5.9862,6.22096,5.86709,6.10098))
ID<-factor(design[,1])
Congestion<-factor(design[,2], levels=c("1","2"))
cd45<-factor(design[,3])
SMC<-factor(design[,4])
#create a design matrix
design<-model.matrix(~ID+Congestion+SMC+cd45)
fit <- lmFit(e, design)
fit <- eBayes(fit)
And received the following error:
Warning message:
Partial NA coefficients for 54675 probe(s)
> fit <- eBayes(fit)
Error in ebayes(fit = fit, proportion = proportion, stdev.coef.lim = stdev.coef.lim, :
No residual degrees of freedom in linear model fits
How do I get this to work? I'm uncertain as to what I'm doing improperly in my naiveté and any assistance would be greatly appreciated. Thank you in advance!
Thank you so much!!