SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
DEXSeq fitDispersionFunction error id0 Bioinformatics 4 03-10-2014 03:59 AM
DESeq - estimateDispersion doubt alisrpp Bioinformatics 5 06-05-2013 01:15 PM
Error while running DEXSeq Mudita Introductions 4 04-18-2013 04:37 AM
Could not find function 'estimateDispersion' error kasutubh Bioinformatics 3 02-14-2013 02:21 PM
DEXSeq error xguo Bioinformatics 4 12-06-2011 06:31 AM

Reply
 
Thread Tools
Old 07-25-2014, 09:17 AM   #1
finfin
Junior Member
 
Location: Dallas

Join Date: Dec 2011
Posts: 8
Default DEXSeq estimatedispersion error

Added on 1st Aug: solved. Thank you everyone.

I was trying DEXSeq and I stuck at the dispersion estimation step.
I got exactly the same error as described in:
http://seqanswers.com/forums/showthread.php?t=22644

The process stuck there for hours and then threw out error messages as following:

1: In .local(object, ...) :
Exons with less than 11 counts will be discarded. For more details read the documentation, parameter minCount
2: In .local(object, ...) :
Genes with more than 70 testable exons will be kicked out of the analysis. For more details read the documentation, parameter maxExon
3: In .local(object, ...) :
Failed to set up model frames for genes ENSG (a bunch of gene names here)

I read the previous discussion where people mentioned by upgrade to Version 1.2.1 the problem will be solved. However, I downloaded the package this week so it is the newest version.

If anyone knows how to solve this problem, please kindly reply. I do appreciate it.

I have 3 replicates for both treatment and control, and the session information is attached below.



> sessionInfo()
R version 2.15.0 (2012-03-30)
Platform: x86_64-redhat-linux-gnu (64-bit)

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=C LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics grDevices utils datasets methods
[7] base

other attached packages:
[1] pasilla_0.2.13 DESeq_1.8.3 locfit_1.5-9.1
[4] DEXSeq_1.2.1 Biobase_2.16.0 BiocGenerics_0.2.0

loaded via a namespace (and not attached):
[1] annotate_1.34.1 AnnotationDbi_1.18.4
[3] biomaRt_2.12.0 DBI_0.2-7
[5] genefilter_1.38.0 geneplotter_1.34.0
[7] grid_2.15.0 hwriter_1.3
[9] IRanges_1.14.4 lattice_0.20-6
[11] plyr_1.8 RColorBrewer_1.0-5
[13] RCurl_1.91-0 RSQLite_0.11.4
[15] splines_2.15.0 statmod_1.4.20
[17] stats4_2.15.0 stringr_0.5
[19] survival_2.36-12 tools_2.15.0
[21] XML_3.93-0 xtable_1.7-3

Last edited by finfin; 08-01-2014 at 07:20 AM.
finfin is offline   Reply With Quote
Old 07-25-2014, 12:50 PM   #2
Richard Finney
Senior Member
 
Location: bethesda

Join Date: Feb 2009
Posts: 700
Default

I'm getting locked up on estimateDispersions(), too.
Just zones out, never returns.

did you provide a flatenedfile argument to an earlier call (like the
DEXSeqDataSetFromHTSeq() function ) ???
Richard Finney is offline   Reply With Quote
Old 07-25-2014, 01:03 PM   #3
finfin
Junior Member
 
Location: Dallas

Join Date: Dec 2011
Posts: 8
Default

Quote:
Originally Posted by Richard Finney View Post
I'm getting locked up on estimateDispersions(), too.
Just zones out, never returns.

did you provide a flatenedfile argument to an earlier call (like the
DEXSeqDataSetFromHTSeq() function ) ???

I generated the flatten exon annotation file earlier by using the python script directly.
The commands I used were:

exons<-read.table("sampleInfo",header=T,row.names=1)
exonCount<-read.HTSeqCounts(file.path(exons$countFile),exons,"hg19.dexseq.gff")
exonCount<-estimateSizeFactors(exonCount)
exonCount<-estimateDispersions(exonCount) #It stuck here
finfin is offline   Reply With Quote
Old 07-25-2014, 01:10 PM   #4
Richard Finney
Senior Member
 
Location: bethesda

Join Date: Feb 2009
Posts: 700
Default

I'm going to put some print statements in the source and try and figure it out.
I don't even get a message. it just spins for days.

Last thing I see is "using supplied model matrix".

Last edited by Richard Finney; 07-25-2014 at 02:17 PM.
Richard Finney is offline   Reply With Quote
Old 07-28-2014, 07:18 AM   #5
finfin
Junior Member
 
Location: Dallas

Join Date: Dec 2011
Posts: 8
Default

Quote:
Originally Posted by Richard Finney View Post
I'm going to put some print statements in the source and try and figure it out.
I don't even get a message. it just spins for days.

Last thing I see is "using supplied model matrix".
I did not get any error message before it threw out the ones above.

Did you find anything?
finfin is offline   Reply With Quote
Old 07-28-2014, 07:33 AM   #6
Richard Finney
Senior Member
 
Location: bethesda

Join Date: Feb 2009
Posts: 700
Default

Yeah, my script ran for a several days before printing this message....

In estimateDispersionsFit(object, fitType = fitType, quiet = quiet) :
the parametric fit of dispersion estimates over the mean of counts
failed, which occurs when the trend is not well captured by the
function y = a/x + b. A local regression fit is automatically performed,
and the analysis can continue. You can specify fitType='local' or 'mean'
to avoid this message if re-running the same data.
When using local regression fit, the user should examine plotDispEsts(dds)
to make sure the fitted line is not sharply curving up or down based on
the position of individual points.
Richard Finney is offline   Reply With Quote
Old 07-28-2014, 07:51 AM   #7
finfin
Junior Member
 
Location: Dallas

Join Date: Dec 2011
Posts: 8
Default

Quote:
Originally Posted by Richard Finney View Post
Yeah, my script ran for a several days before printing this message....

In estimateDispersionsFit(object, fitType = fitType, quiet = quiet) :
the parametric fit of dispersion estimates over the mean of counts
failed, which occurs when the trend is not well captured by the
function y = a/x + b. A local regression fit is automatically performed,
and the analysis can continue. You can specify fitType='local' or 'mean'
to avoid this message if re-running the same data.
When using local regression fit, the user should examine plotDispEsts(dds)
to make sure the fitted line is not sharply curving up or down based on
the position of individual points.
Did you find this function in source code?
finfin is offline   Reply With Quote
Old 07-28-2014, 09:32 AM   #8
Richard Finney
Senior Member
 
Location: bethesda

Join Date: Feb 2009
Posts: 700
Default

estimateDispersionFit doesn't appear to be part of DexSeq

I'm not sure what package it's part of.
Richard Finney is offline   Reply With Quote
Old 07-28-2014, 09:50 AM   #9
finfin
Junior Member
 
Location: Dallas

Join Date: Dec 2011
Posts: 8
Default

Quote:
Originally Posted by Richard Finney View Post
estimateDispersionFit doesn't appear to be part of DexSeq

I'm not sure what package it's part of.
I checked the source code, and found in R/methods.R, where defines all the functions. In function estimateDispersions.DEXSeqDataSet<-function(fitType=c("parametric", "local","mean"))
But this parameter could not be modified in the function call.
I'm trying to set it to "local" or "mean" only as you suggested. Since I am not quite familiar with R, I am still trying to re-package and install it so that I could test how it goes.

Thank you very much.
finfin is offline   Reply With Quote
Old 07-30-2014, 11:49 AM   #10
Richard Finney
Senior Member
 
Location: bethesda

Join Date: Feb 2009
Posts: 700
Default

Now it's giving me this ...
> ecs <- estimateSizeFactors(dxd)
> ecs <- estimateDispersions(ecs, fitType="local" )
using supplied model matrix
using supplied model matrix
> ecs <- fitDispersionFunction(ecs)
Warning message:
'fitDispersionFunction' is deprecated.
Use 'estimateDispersions' instead.
See help("Deprecated")
> ecs <- testForDEU(ecs)
Error in (function (classes, fdef, mtable) :
unable to find an inherited method for function 'sizeFactors' for signature '"character"'
Calls: testForDEU -> sizeFactors -> <Anonymous>
Execution halted



rrrrghhh
Richard Finney is offline   Reply With Quote
Old 08-01-2014, 01:20 AM   #11
areyes
Senior Member
 
Location: Heidelberg

Join Date: Aug 2010
Posts: 165
Default

Hi finfin, the first messages that you are getting, are they warnings or errors?
When you changed the versions, you mention it is getting stuck in estimateDispersions, what version of DEXSeq are you using?

Hi Richard, when doing this:
Code:
> a <- fitDispersionFunction()
Warning message:
'fitDispersionFunction' is deprecated.
Use 'estimateDispersions' instead.
See help("Deprecated") 
> a
[1] "'fitDispersionFunction' is deprecated.\nUse 'estimateDispersions' instead.\nSee help(\"Deprecated\")"
Your DEXSeqDataSet object seems to be substituted for a character vector and thats the reason "testForDEU" is failing, does not seem like a nice behaviour of a deprecated function... will check this!

For both, you seem to be running DEXSeq using a single core. I would recommend using multiple cores to speed up the computations (see the parameter BPPARAM of both estimateDispersions and testForDEU). A set of 2 conditions, 3 replicates each should take less than 20 minutes using 5 cores.

Alejandro
areyes is offline   Reply With Quote
Old 08-01-2014, 07:19 AM   #12
finfin
Junior Member
 
Location: Dallas

Join Date: Dec 2011
Posts: 8
Default

Quote:
Originally Posted by areyes View Post
Hi finfin, the first messages that you are getting, are they warnings or errors?
When you changed the versions, you mention it is getting stuck in estimateDispersions, what version of DEXSeq are you using?

Hi Richard, when doing this:
Code:
> a <- fitDispersionFunction()
Warning message:
'fitDispersionFunction' is deprecated.
Use 'estimateDispersions' instead.
See help("Deprecated") 
> a
[1] "'fitDispersionFunction' is deprecated.\nUse 'estimateDispersions' instead.\nSee help(\"Deprecated\")"
Your DEXSeqDataSet object seems to be substituted for a character vector and thats the reason "testForDEU" is failing, does not seem like a nice behaviour of a deprecated function... will check this!

For both, you seem to be running DEXSeq using a single core. I would recommend using multiple cores to speed up the computations (see the parameter BPPARAM of both estimateDispersions and testForDEU). A set of 2 conditions, 3 replicates each should take less than 20 minutes using 5 cores.

Alejandro
Hi Alejandro, they are warnings.

I tried a clean environment and re-installed everything, now I got the results.
I think somehow the previous environment still used a very old version.

Thank you very much.
finfin is offline   Reply With Quote
Reply

Tags
dexseq, dispersion error

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 09:36 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2021, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO