Hi I'm wondering if someone can help confirm if my contrast is correct. What want is to compare one set of analysis to another. Like a venn diagram. Circle one would be Exp A and Exp B would be another circle, so now I want to know what the different between these two experiments are.
Lets call one exp A and the exp B so now essentially I want to know the difference of the difference. Can someone help confirm my contrast below to see if I'm doing this correctly?
I think its correct,
cmp = (A_exp-A_control) - ( B_exp - B_control) however why I'm concern is that when I ran pathway analysis, this analysis yield the same pathways that was present in both (A_exp-A_control) and ( B_exp - B_control) when done alone ( below contrast would be expA and expB, respectively)? How would this be possible?
thank you in advance.
input <- 'id group S1 A_control S2 A_control S3 A_control S4 A_exp S5 A_exp S6 A_exp S7 B_control S8 B_control S9 B_control S10 B_exp S11 B_exp S12 B_exp ' df = read.table ( text=input, header=T) group = df$group design <- model.matrix(~0 + group ) colnames ( design) = gsub ( 'group',"",colnames(design)) contrast.matrix <- makeContrasts( ,cmp = (A_exp-A_control) - ( B_exp - B_control) ,expA = (A_exp-A_control) # these would be simple comparison of exps in isolation. , expB = ( B_exp - B_control) ,levels=design )