Question: edgeR/csaw design matrix
0
gravatar for dcheng1
4 weeks ago by
dcheng10
dcheng10 wrote:

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!!

rna-seq chip-seq R • 96 views
ADD COMMENTlink modified 4 weeks ago by h.mon24k • written 4 weeks ago by dcheng10
1
gravatar for h.mon
4 weeks ago by
h.mon24k
Brazil
h.mon24k wrote:

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.

ADD COMMENTlink written 4 weeks ago by h.mon24k

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

ADD REPLYlink written 4 weeks ago by dcheng10
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 902 users visited in the last hour