DESeq2 LRT Error: less than one degree of freedom, perhaps full and reduced models are not in the correct order
2
0
Entering edit mode
musa ▴ 10
@musa-4898
Last seen 8.3 years ago

Hi Michael,

I am trying to use the DESseq package to estimate ribosome loading efficiency as described in "systemPipeR Workflow for Ribo-Seq and polyRibo-Seq Experiments".

 

But I have run into some problems that I can't understand the genesis i.e.

 

"Error in nbinomLRT(object, full = full, reduced = reduced, betaPrior = betaPrior,  :

less than one degree of freedom, perhaps full and reduced models are not in the correct order"

 

I have tried to look around the source of this error in the manpages but can't find it. 

 

My colData looks like this:

 

DataFrame with 8 rows and 2 columns

              assay condition

           <factor>  <factor>

M1A     Ribo        M1

M1B     Ribo        M1

A1A      Ribo        A1

A1B      Ribo        A1

V1A     mRNA        M1

V1B    mRNA        M1

M6A     mRNA        A1

M6B     mRNA        A1

 

with a datafile matching the colData row.names and as you can see every sample has a df>1

 

But when I run:

 

dds=DESeq(dds,test="LRT",reduced= ~assay+condition)

 

I get the above error message.

 

Is there something am missing?

 

Thanks,

Musa

deseq2 systempiper Tutorial • 4.1k views
ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 3 days ago
United States

hi Musa,

What is the design you used when creating the dds? You should read over the "Likelihood ratio test section" of the vignette

vignette("DESeq2")

and this help page which explains how the LRT works in DESeq2:

?nbinomLRT

You don't have to use the nbinomLRT() function directly, it is used within DESeq(), but this is where we have the help information.

ADD COMMENT
0
Entering edit mode
musa ▴ 10
@musa-4898
Last seen 8.3 years ago

Hi Michael,

Thanks for your response

This is how I created the dds

dds=DESeqDataSetFromMatrix(countData=as.matrix(y[,rownames(coldata)]),colData=coldata,design=~assay+condition:condition)

with coldata as is in the email above.

I have looked at the vignette but can't figure out the source or what likely causes this type of error.

Musa

ADD COMMENT
0
Entering edit mode

note: I'm adding a comment to your post (you are posting an answer to your own original question)

The condition:condition term doesn't make any sense. What is your biological question you want to answer?

ADD REPLY
0
Entering edit mode

I want to test if the ribosome release score in M1 is different from A1 ( (Ribo A 1/mRNA A 1)/(Ribo M 1/mRNA M 1). I was just testing the systemPipeR workflow as described in there and that was the design.

ADD REPLY
0
Entering edit mode

You want a design of ~assay + condition + condition:assay and a reduced of ~assay + condition.

See also the section of ?results about interpreting results tables from likelihood ratio tests.

ADD REPLY
0
Entering edit mode

That worked. Thanks.

ADD REPLY
0
Entering edit mode

Note systemPipeR seems to have the correct code in their vignette:

dds <- DESeqDataSetFromMatrix(countData=as.matrix(countDFeByg[,rownames(coldata)]), colData = coldata, design = ~ assay + condition + assay:condition) 
dds <- DESeq(dds, test="LRT", reduced = ~ assay + condition) 
res <- DESeq2::results(dds) head(res[order(res$padj),],4)
ADD REPLY

Login before adding your answer.

Traffic: 870 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