Question: deseq2 formula design
0
gravatar for nabiyogesh
11 weeks ago by
nabiyogesh0
nabiyogesh0 wrote:

Hi,

I do have samples collected from 2 different region and from each region we collected sample from 9 villages like this

Rajshahi ----9 villages Mymensingh --9 villages

Now I want to do differential microbial abundance between Rajshahi and Mymensingh, but by controlling for the effect of villages:

when I pass below code it show error:

> psfdds = phyloseq_to_deseq2(ps5, ~ Villages + Region)
converting counts to integer mode
Error in checkFullRank(modelMatrix) : 
  the model matrix is not full rank, so the model cannot be fit as specified.
  One or more variables or interaction terms in the design formula are linear
  combinations of the others and must be removed.

  Please read the vignette section 'Model matrix not full rank':

But when I pass below code there is no error

> psfdds = phyloseq_to_deseq2(ps5, ~Region)
converting counts to integer mode

and sample data looks like this:

> sample_data(ps5)
Sample Data:        [48 samples by 5 sample variables]:
                       X.SampleID            Treatment Compartment   Villages              Region           
Root-1.S35.L001   Root-1.S35.L001                  ash        Root  Kholabari            Mymensingh
Root-10.S75.L001 Root-10.S75.L001                  ash        Root     Matura            Rajshahi
Root-13.S5.L001   Root-13.S5.L001                  ash        Root      Gokul            Rajshahi
Root-14.S16.L001 Root-14.S16.L001                  ash        Root       Jiol            Mymensingh
Root-17.S26.L001 Root-17.S26.L001                  ash        Root    Chandia            Rajshahi

could you please advise me how I can see the effect of region by controlling the effect of villages?

thanks nabiyogesh

deseq2 • 118 views
ADD COMMENTlink modified 11 weeks ago by swbarnes2330 • written 11 weeks ago by nabiyogesh0
Answer: deseq2 formula design
1
gravatar for swbarnes2
11 weeks ago by
swbarnes2330
swbarnes2330 wrote:

If each village is in exactly one region, you can't put village and region in the design. Pick one or the other.

ADD COMMENTlink written 11 weeks ago by swbarnes2330
Answer: deseq2 formula design
0
gravatar for Michael Love
11 weeks ago by
Michael Love25k
United States
Michael Love25k wrote:

Did you take a look at the vignette section that the error message points you to? It has useful information about why various designs are not possible. Take a look there first please and come back with specific questions.

ADD COMMENTlink written 11 weeks ago by Michael Love25k

Dear Michael, Thanks, please help me to understand it. Deseq2 vignette says it can be because of two reasons, but I did not able understand it but I think certainly these two factors are not linear combination.

“the model matrix is not full rank, so the model cannot be fit as specified.” There are two main reasons for this problem: either one or more columns in the model matrix are linear combinations of other columns, or there are levels of factors or combinations of levels of multiple factors which are missing samples. We address these two problems below and discuss possible

ADD REPLYlink written 11 weeks ago by nabiyogesh0
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 16.09
Traffic: 302 users visited in the last hour