Hi Mike,
I have a question about the paired design. I have gone through vignette about linear combinations but could not achieve Pair adjustment with another factor. I am getting model being not full rank. Could you please help? Below is my design and what I try to achieve,
prep = c("L","D","D","D","L","L","D","L","D")
lb1 = rep(paste('Lib1','Tre',sep="_"),9)
lb2 = rep(paste('Lib2','Tre',sep="_"),9)
df.cd = data.frame(SampleID = LETTERS[1:18],
Prep = c(prep,prep),
cond = c(lb1,lb2),
Pair = factor(c(seq(1:9),seq(1:9))) )
rownames(df.cd) = df.cd$SampleID
all.equal(colnames(mat),rownames(df.cd))#[1] TRUE
dds = DESeqDataSetFromMatrix(countData = mat,
colData = df.cd,
design = ~Pair+Prep+cond)
****ERROR** Please help***
dds2 = DESeq(dds)
res = results(dds2,contrast=c("cond","Lib1_Tre",'Lib2_Tre'))
sessionInfo( )
R version 4.1.0 (2021-05-18)
DESeq2_1.32.0
Please let me know if anything is not clear.