Question: Error in design.matrix in edgeR?
0
gravatar for Björn
2.4 years ago by
Björn40
Björn40 wrote:

My research question is to find difference of miRNA in Groups1 before and after treatment. Sub-groups "B", "C" are pre while "BF", and "CF" are post samples.

basefup<-factor(group$Groups1, levels = c("B", "BF", "C", "CF", "NC"))
treatment<-factor(group$Groups, levels = c("NC", "pre", "post"))
#Design matrix
design<-model.matrix(~0+basefup+treatment) 
colnames(design)
y <- estimateDisp(y, design, robust=TRUE)

Gives following error:

Error in glmFit.default(sely, design, offset = seloffset, dispersion = 0.05,  : Design matrix not of full rank.  The following coefficients not estimable:  treatmentpre treatmentpost

any suggestions ?

My data structure is as shown below which are paired data and NC as control without paired data.

BF is after treatment sample of B, CF is after treatment sample of C. The B, C are two different clinical conditions.

Groups Patient Groups1

pre a B
pre b B
pre c B
post a BF
post b BF
post c BF
pre d B
pre e B
pre f B
post d BF
post e BF
post f BF
pre g C
pre h C
pre i C
post g CF
post h CF
post i CF
NC x NC
NC y NC
NC z NC

what I want to do is to compare DE miRNAs between

  1. B-NC , C-NC, BF-NC, CF-NC which means DE mirnas in each groups taking NC as reference
  2. combined (B+C)/2- NC and (BF+CF)/2- NC
  3. (BF+CF)/2- (B+C)/2
  4. BF-B, CF-C which are DE miRNAs after and before treatment
edger rna-seq mirnaseq R • 1.4k views
ADD COMMENTlink modified 2.4 years ago by Devon Ryan95k • written 2.4 years ago by Björn40

You can edit your posts by clicking on the "edit" button. I lieu of that, I've copied your answer into your post.

ADD REPLYlink written 2.4 years ago by Devon Ryan95k
0
gravatar for Devon Ryan
2.4 years ago by
Devon Ryan95k
Freiburg, Germany
Devon Ryan95k wrote:

I assume what you actually want is something like this:

sample   subgroup   treatment
1        B          control
2        B          control
3        C          control
4        C          control
5        B          treatment
...

And so on. The model is then ~subgroup + treatment, since presumably you want the treatment effect while accounting for subgroups.

Given your update:

  1. model ~0 + group1 and use the contrasts you specified.
  2. Define "combined"
  3. model ~0 + group1 and use the contrasts you specified.
  4. model ~0 + group1 and use the contrasts you specified.
ADD COMMENTlink modified 2.4 years ago • written 2.4 years ago by Devon Ryan95k

The data set you created is different that the real one. sorry for confusion. The dataset is provided again

ADD REPLYlink written 2.4 years ago by Björn40

I've updated my reply.

ADD REPLYlink written 2.4 years ago by Devon Ryan95k
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: 1688 users visited in the last hour