I am using a piece of pre-existing code to perform differential expression analysis with a single case and multiple (6) controls. I am a non-statistician and am somewhat new to the minutiae of edgeR.
I include the core of the code below. Essentially I want to confirm whether the solution currently being used is suitable, or if there is a better alternative for the 1 vs 6 scenario.
Any input would be appreciated.
y <- calcNormFactors(y)
#creatin the design matrix
condition=factor(c(rep("T", 1), rep("N", ncol(allrpkms)-1)))
design <- model.matrix(~condition)
rownames(design) <- colnames(y)
#estimating the dispersion for the dataset
y <- estimateGLMCommonDisp(y, design, verbose=TRUE)
y <- estimateGLMTrendedDisp(y, design)
y <- estimateGLMTagwiseDisp(y, design)
#determine differentially expressed genes. Fit genewise glms
fit <- glmFit(y, design)
lrt <- glmLRT(fit)
#Conduct likelihood ratio tests for tumour vs normal tissue differences and show the top genes:
deseqres<-topTags( lrt , n = nrow( lrt$table ) )$table