Question: DESeq2 LRT Error: less than one degree of freedom, perhaps full and reduced models are not in the correct order
0
3.4 years ago by
musa10
musa10 wrote:

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 • 1.3k views
modified 3.4 years ago • written 3.4 years ago by musa10
Answer: DESeq2 LRT Error: less than one degree of freedom, perhaps full and reduced mode
0
3.4 years ago by
Michael Love26k
United States
Michael Love26k wrote:

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.

Answer: DESeq2 LRT Error: less than one degree of freedom, perhaps full and reduced mode
0
3.4 years ago by
musa10
musa10 wrote:

Hi Michael,

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

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

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.

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

That worked. Thanks.

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)