deseq2 formula design
2
0
Entering edit mode
Jitendra ▴ 10
@nabiyogesh-11718
Last seen 6 days ago
United Kingdom

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 • 759 views
ADD COMMENT
1
Entering edit mode
swbarnes2 ★ 1.3k
@swbarnes2-14086
Last seen 20 hours ago
San Diego

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

ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 42 minutes ago
United States

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 COMMENT
0
Entering edit mode

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 REPLY

Login before adding your answer.

Traffic: 751 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6