Error when run testForDEU DEXSeq
0
0
Entering edit mode
7.1 years ago
Lila M ★ 1.3k

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!

DEXSeq error DEU RNAseq • 1.8k views
ADD COMMENT
1
Entering edit mode

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 REPLY
1
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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

ADD REPLY

Login before adding your answer.

Traffic: 2825 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6