Question: Error when run testForDEU DEXSeq
0
gravatar for Lila M
3.0 years ago by
Lila M 860
UK
Lila M 860 wrote:

Hie everybody, I have this error when I've tried to run dsd = testForDEU(dsd)

Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘sizeFactors’ for signature ‘"list"’

My complete code is:

meta <- read.delim(file.path("meta"), header=T)
rownames(meta) <- meta$sample_ID

countfiles <- list.files(pattern = "*.txt", full.names = TRUE)
names(countfiles) <- gsub(".txt", "", basename(countfiles))
flattenedFile = list.files(pattern="gff$", full.names=TRUE)
basename(flattenedFile)
dsd <- DEXSeqDataSetFromHTSeq(countfiles = countfiles, sampleData = meta, 
                              design = ~ sample + exon + levels:exon, flattenedfile = flattenedFile)

genesForSubset <- unique(geneIDs(dsd))
dsd <- dsd[geneIDs(dsd) %in% genesForSubset,]
colData(dsd)
dsd = estimateDispersions(dsd)
dsd = estimateSizeFactors( dsd )
dsd = plotDispEsts(dsd)
dsd = testForDEU(dsd)

The flattened file was created using

 python dexseq_prepare_annotation.py gencode.v27.annotation.gtf annot.hg38.DEXSeq.gff

and the counts:

 ls *.bam.sam | xargs -I {} -n 1 python dexseq_count.py -p yes -s reverse -r pos annot.hg38.DEXSeq.gff {} {}.txt

Any suggestion or idea to solve my problem?

Thanks!

deu error rnaseq dexseq • 851 views
ADD COMMENTlink modified 3.0 years ago • written 3.0 years ago by Lila M 860
1

Check str(dsd) after calling DEXSeqDataSetFromHTSeq, and again when subsetting. I suspect you've somehow made that object into a list rather than a DESeq2 object.

ADD REPLYlink written 3.0 years ago by andrew.j.skelton736.0k
1

I think you forgot to call dsd = estimateSizeFactors( dsd )

ADD REPLYlink written 3.0 years ago by michael.ante3.6k

I forgot to include it in the code, but I've called it as well, thanks!

ADD REPLYlink written 3.0 years ago by Lila M 860

Did you call it in that order? Or to be more precise: after which call did the error message apear?

ADD REPLYlink written 3.0 years ago by michael.ante3.6k

Yes, I called it in that order, and the error appear after dsd = testForDEU(dsd)

ADD REPLYlink written 3.0 years ago by Lila M 860

AFAIK, you need to estimate the SizeFactors before estimating the dispersion.

ADD REPLYlink written 3.0 years ago by michael.ante3.6k
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.3.0
Traffic: 894 users visited in the last hour