I am running a RNA-Seq analysis with these targets
Array Treatment Time.h Col.0.4h.primed.CEL heat 4 Col.0.8h.primed.CEL heat 8 Col.0.24h.primed.CEL heat 24 Col.0.48h.primed.CEL heat 48 Col.0.4h.unprimed.CEL control 4 Col.0.8h.unprimed.CEL control 8 Col.0.24h.unprimed.CEL control 24 Col.0.48h.unprimed.CEL control 48
I am following the chapter 9.6.2 of the limma guide, got the fitting and I am able to get the toptable list of DE genes. But I am lost in some questions
I wrote the following scripts. I got the topTable files without problems, and my adjusted.p values are meaningful
library(limma) data <- read.delim("raw_rma_normalized_expression_values.txt", as.is = TRUE) readTargets("targets2.txt") colnames(targets) <- c("Array", "treatment", "time.h") library(splines) X <- ns(targets$time.h, df= 2) Group <- factor(targets$treatment) design <- model.matrix(~Group*X) fit <- lmFit(data, design) fit <- eBayes(fit) # The data obtained by topTable toptable1_4 <- topTable(fit, coef=1:4) toptable1_2 <- topTable(fit, coef=1:2) toptable1_3 <- topTable(fit, coef=1:3)
Now my questions
1. Why the fit <- lmFit(data, design) fails if I define in X <- (targets$time.h, df=2) a value of df >= 3
2. I do not know the meaning of the coefficients being compared in the latest three lanes of code. Why I have 6 coefficients? What should I do to compare my treatmens in time (4h vs the rest of the times) or 8h vs the resto of the time, and so on..
3. What are the consequences of defining a different df value in the ns function ?
4. How can I get graphics and get profit of this data ?
Thank you in advance