Search
Question: DESeq2 LRT Error: less than one degree of freedom, perhaps full and reduced models are not in the correct order
0
gravatar for musa
16 months 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

ADD COMMENTlink modified 16 months ago • written 16 months ago by musa10
0
gravatar for Michael Love
16 months ago by
Michael Love14k
United States
Michael Love14k 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.

ADD COMMENTlink modified 16 months ago • written 16 months ago by Michael Love14k
0
gravatar for musa
16 months ago by
musa10
musa10 wrote:

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 COMMENTlink written 16 months ago by musa10

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 REPLYlink written 16 months ago by Michael Love14k

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 REPLYlink written 16 months ago by musa10

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 REPLYlink written 16 months ago by Michael Love14k

That worked. Thanks.

ADD REPLYlink written 16 months ago by musa10

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 REPLYlink written 16 months ago by Michael Love14k
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.2.0
Traffic: 113 users visited in the last hour