This is a test version of Biostars. For the public version, visit https://www.biostars.org.
edgeR/csaw design matrix

I used csaw package which is based on edgeR's statistical method. So I need to have a design matrix. The user guide gives an example of analysing 2 groups as below:

bam.files <- c("es_1.bam", "es_2.bam", "tn_1.bam", "tn_2.bam")
design <- model.matrix(~factor(c('es', 'es', 'tn', 'tn')))
colnames(design) <- c("intercept", "cell.type")

However, I want to analysis 3 groups, so below is how I set the design matrix:

bam.files <- c("heart.bam", "liver.bam", "muscle.bam")
design <- model.matrix(~factor(c('heart', 'liver', 'muscle')))
colnames(design) <- c("intercept1","intercept2", "cell.type")

Then I tried to find differentially bind regions:

y <- asDGEList(filtered.data)
y <- estimateDisp(y, design)

And I got error:

**Warning message:
In estimateDisp.default(y = y$counts, design = design, group = group,  :
  No residual df: setting dispersion to NA**

Any advices would be greatly appreciated!!

chip-seq rna-seq r

1 answer

edgeR needs biological replicates to estimate dispersion, and you don't have replicates, as you have one sample per tissue. This is a poor experimental design and is not recommended. Similar questions have been asked before, please search the site - here are just two examples:

Analyzing RNA-seq without replicates

Advice on RNASeq analysis without biological replicates for differential gene expression.

If you read a good number of them, you will notice answers in more recent threads are more adamant about not performing experiments without biological replicates, there are two reasons: 1) there is a sizeable literature exploring sample sizes and power for RNAseq, and the bare minimum recommended is three biological replicates per treatment, 2) in the beginning, RNAseq costs were higher, and properly-powered experiments were very expensive to perform, but nowadays costs are significantly lower.

Thanks! This helps! Will search before ask questions next time!

Log in to answer this question.