Hi everyone, I already did an analysis over samples with Tumor or Healthy. For it I did :
# create design factors [pan-cancer]
pan.cancer <- factor(sample.cond$condition) #Factor for HC/Tumor
# build the design matrix based on the group
design.pan.cancer <- model.matrix(~ 0 + pan.cancer)
# compute common, trend, tagwise dispersion
y <- estimateDisp(y,design = design.pan.cancer ,robust = TRUE)
# fit the negative binomial GLM for each tag
fit <- glmFit(y, design.pan.cancer)
# build the contrast
contrast <- makeContrasts(Tumor - HC, levels=colnames(design.pan.cancer))
# Likelihood ratio test
lrt.pan.cancer<- glmLRT(fit, contrast = contrast)
Everything works fine, but now I have to do the same but for multiclasses. Because further I need the significant genes in order to do SVM Classification. How can I make the contrast matrix having 7 classes (I need all vs all) ? The classes now are not Tumor and HC(Healthy Control) but now they are :
Breast,CRC,GBM,Hepatobiliary,Lung,Pancreas,HC
I made the design but I dont know how to make the contrast :
# create design factors [multi-class]
multi.class <- factor(sample.cond$class) #Factor for HC/Breast/GBM/CRC/ Hepatobiliary,Lung,Pancreas,HC
# build the design matrix based on the group
design.multi.class <- model.matrix(~ 0 + multi.class)
# compute common, trend, tagwise dispersion
y.multi.class <- estimateDisp(y.multi.class,design = design.multi.class ,robust = TRUE)
# fit the negative binomial GLM for each tag
fit.multi.class <- glmFit(y.multi.class, design.multi.class)
# build the contrast
??
All vs all. I have 7 classes so a factor of 7. And I need the comparison between all of them. Doing it manually is too much so I was wondering how to do it, im pretty sure there is a way. I hope at least. Example:
Breast Vs CRC , Breast Vs GBM, Breast Vs Hepabiliary .......... until all is compared to all. Is it possible?
I actually just want an ANOVA on the 7 classes , this is what the book says :
They use edgeR but dont tell the passages so im trying to interpret it. I have a count matrix with 285 samples and 16000 genes. The samples are divided in 7 groups that are the 7 classes (Brca,Crc,GBM,HBC,Lung,PAAD). So what should I do? I just followed edgeR but I dont know how to compare them equally with the fit.