Search
Question: Error in estimateDispersions of DEXSeq
0
3.9 years ago by
United States
deeya.saha860 wrote:

Sir,

While running DEXSeq on a Human dataset, (commands given below), I get the following error.

> countFiles=list.files(inDir,pattern="fb.txt$",full.names=TRUE) >flattenedFile=list.files(inDir,pattern="gff$",full.names=TRUE) >sampleTable=data.frame(row.names=c("treated1","treated2","treated3","untreated1","untreated2","untreated3"),condition=c("knockdown","knockdown","knockdown","control","control","control"),libType=c("paired-end","paired-end","paired-end","paired-end","paired-end","paired-end")) >library("DEXSeq") >dxd=DEXSeqDataSetFromHTSeq(countFiles,sampleData=sampleTable,design=~sample+exon+condition:exon,flattenedfile=flattenedFile ) >dxd_esf=estimateSizeFactors(dxd) >dxd_ed=estimateDispersions(dxd_esf)

>dxd_ed=estimateDispersions(dxd_esf,fitType="mean")

#using supplied model matrix
#Error in estimateDispersionsFit(object, fitType = fitType, quiet = quiet) :
#  all gene-wise dispersion estimates are within 2 orders of magnitude
#from the minimum value, and so the standard curve fitting techniques will not work.
#You can instead use the gene-wise estimates as final estimates:
#dds <- estimateDispersionsGeneEst(dds)
#dispersions(dds) <- mcols(dds)$dispGeneEst I tried using a smaller subset of geneset, but to no avail. genesForSubset=read.table(file.path(inDir,"Human_IDC.txt"),stringsAsFactors=FALSE)[[1]] dxd=dxd[geneIDs( dxd )%in%genesForSubset,] >dxd_ed=estimateDispersions(dxd_esf,fitType="mean") using supplied model matrix Error in estimateDispersionsFit(object, fitType = fitType, quiet = quiet) : all gene-wise dispersion estimates are within 2 orders of magnitude from the minimum value, and so the standard curve fitting techniques will not work. You can instead use the gene-wise estimates as final estimates: dds <- estimateDispersionsGeneEst(dds) dispersions(dds) <- mcols(dds)$dispGeneEst

Even, I tried using (estimateDispersionsGeneEst(dds) on dxd_esf object, but landed up with the following error.

dds <- estimateDispersionsGeneEst(dxd_esf)
#error: inv(): matrix appears to be singular

#Error: inv(): matrix appears to be singular

modified 3.9 years ago by Michael Love20k • written 3.9 years ago by deeya.saha860
0
3.9 years ago by
Michael Love20k
United States
Michael Love20k wrote:

This check occurs in DESeq2, where all the gene wise dispersion values are less than 1e-6, where the minimal value is 1e-8. Then it would be problematic to fit a dispersion trend. The reason for a minimal value, is that for a given row of the count matrix, the maximum likelihood estimate can tend to 0 (and so we have a rule to stop after 1e-8). Is there something special about this dataset, why the counts are not overdispersed? Typically with biological replicates, we observe overdispersion in gene or exon counts. If you plot the counts of one sample against another (in log scale), do all the points fall on a diagonal line?