Hi Devon,
Thank you for taking time to explain this. The Limma package, although extensive, does not contain info from which I can derive a solution to my problem. I've read the similar thread: Limma Package For Differential Expression Between Control And Stress
Without any success and this might explain why:
Following Your advice:
Importing the data:
genes <- read.table(header=TRUE, sep=";", text =
"treatment;IL10_BL;IL10_1Y;IL10_fold;IL6_BL;IL6_1Y;IL6_fold;
diet;1.1;1.5;1.4;1.4;1.4;1.1;
statin;2.5;3.3;1.3;2.7;3.1;1.1;
statin;3.2;4.0;1.3;1.5;1.6;1.1;
diet;3.8;4.4;1.2;3.0;2.9;0.9;
statin;1.1;3.1;2.8;1.0;1.0;1.0;
diet;3.0;6.0;2.0;2.0;1.0;0.5;")
# Don't know where the column X came from; deleting it
genes[,"X"] = NULL
# Creating the eset dataset, which is to be analysed
eset <- data.frame(t(genes))
#Following advice from link above
design=cbind(statin=c(1,1,0,0), diet=c(0,0,1,1))
fit <- lmFit(eset, design)
# Yields the error:
Error in rowMeans(y$exprs, na.rm = TRUE) : 'x' must be numeric
If possible, I would appreciate some more guidance.
Much appreciated.
I have still not found out how to solve the issue... unfortunately.
Anyone who can provide some assistance?
Thanks in advance
Where are you stuck now? BTW, you should really consider just collaborating with a local bioinformatician/statistician, since even once you're able to get everything to work I expect you won't really know how to QC everything.
I have made an effort to read the user guide accompanying limma package, before posting here again.
My data set is set up the same way, as the "eset" object in my reply below. Therefore:
I have tried a range of model matrices and subsequently analyze if there are differential gene expressions between the treatment groups. None of them have worked. I do not argue that my efforts are qualitative, since I'm not used to analyze gene data. I have no biostatician in my vicinity to ask.
I'd like to ask for some coding support here? I have the above data set and wish to examine if gene expression differs between the groups.
I would appreciate it immensely.
(1) Delete the first row. Put you column:group assignments in a different file (put them in the same order, of course). (2) What model matrices have you tried and what exactly do you mean by "none of them have worked"?
(1) done that now.
(2) A somewhat comparable example in the vignette where African males and females are compared uses the following matrix:
I did not figure out how to apply this to my data.
I also tried:
and several other similar designs.
The problem is that
(a) I don't know what matrix to design, and
(b) how to use the expression data set, the list created in (1) and the design matrix. Because that gives me three objects to work with, while the vignette always includes a design matrix and data.
Regards
The list of sample associations is used by model.matrix(). In short, you make a dataframe whose rows are samples and columns are parameters (diet, individual, etc.). Unless you know what you're doing, which would require having taken linear algebra at some point in your education, it's probably not a good idea to make random model matrices by hand (i.e., use model.matrix()). Your design is just ~diet or ~statin, depending on what you want to call things. If you look at section 9.7 of the users guide, you'll see an example of an experiment similar to (but more complicated than) yours. In this example, the dataframe or vector created in step (1) would be
targets. You'd use that to create the design matrix.