Hello,
I am quite new to limma and I am looking for some advice regarding the matrix disign and contrast matrix.
I have RNA-seq data from 3 genotypes and 2 time points (not a time course), 2 replicates each
The targets file looks as follow:
gen Read1 Read2 out zt
N NAR1.fa NAR2.fa NA.bam 0
N NBR1.fa NBR2.fa NB.bam 12
C....
C ......
D ......
D .......... each line repeated twice
I am interested in DEGs in N-C and D-C and that go in opposite direction in N and D compared to C. So genes that are high in N (compared to C) and low in D or low in N and high in D. I would like to use the zt information to identify gen zt interactions in the subset of genes identified above.
The command I used are:
> gen <- factor(targets$gen, levels=c("N","C","D"))
> design <- model.matrix(~0+gen)
> colnames(design) <- c("N","C","D")
> v <- voom(dge,design,plot=TRUE)
> fit <- lmFit(v,design)
> cont.matrix <- makeContrasts(NC=N-C, DC=D-C, Diff=(N-C)-(D-C) ,levels=design)
> fit2 <- contrasts.fit(fit, cont.matrix)
> fit2 <- eBayes(fit2)
In this design I am non considering zt.
How can I include zt in order to find gen~zt interactions?
Thanks,
Mirko
To clarify, you have 12 samples in total; 2 replicates each for N0, N12, C0, C12 and D0, D12. Is that right?
Yes exactly.
Yes exactly.