This is a test version of Biostars. For the public version, visit https://www.biostars.org.
DEXSeq error while creating ExonCountSet object

Hi

I am using DEXSeq for my analysis.

However, I am facing error while making the ExonCountSet object for further processing.

Specifically, on running

ecs <- read.HTSeqCounts(sampleTable$countFile, sampleTable, dros_flattened.gff)

I get the error:

Error in checkAtAssignment("character", "annotationFile", "character") :
  'annotationFile' is not a slot in class "character"
In addition: Warning message:
'newExonCountSet' is deprecated.
Use 'DEXSeqDataSet' instead.
See help("Deprecated")

I prepared the gff file using the dexseq python script, and all other steps alsp as in the DEXSeq vignette.

Any suggestions/workarounds are most welcome.

Thanks
M

next-gen rna-seq r

What's the output of sessionInfo()? It's likely that you just need to update all of the packages.

The output of sessionInfo()

>sessionInfo()
R version 3.1.0 (2014-04-10)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=de_DE.UTF-8
 [4] LC_COLLATE=en_US.UTF-8     LC_MONETARY=de_DE.UTF-8    LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=de_DE.UTF-8       LC_NAME=C                  LC_ADDRESS=C
[10] LC_TELEPHONE=C             LC_MEASUREMENT=de_DE.UTF-8 LC_IDENTIFICATION=C

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

other attached packages:
 [1] DEXSeq_1.10.3           BiocParallel_0.6.0      DESeq2_1.4.5
 [4] RcppArmadillo_0.4.300.0 Rcpp_0.11.1             GenomicRanges_1.16.3
 [7] GenomeInfoDb_1.0.2      IRanges_1.22.6          Biobase_2.24.0
[10] BiocGenerics_0.10.0     BiocInstaller_1.14.2

loaded via a namespace (and not attached):
 [1] annotate_1.42.0      AnnotationDbi_1.26.0 BatchJobs_1.2
 [4] BBmisc_1.6           biomaRt_2.20.0       Biostrings_2.32.0
 [7] bitops_1.0-6         brew_1.0-6           codetools_0.2-8
[10] DBI_0.2-7            digest_0.6.4         fail_1.2
[13] foreach_1.4.2        genefilter_1.46.1    geneplotter_1.42.0
[16] grid_3.1.0           hwriter_1.3          iterators_1.0.7
[19] lattice_0.20-29      locfit_1.5-9.1       plyr_1.8.1
[22] RColorBrewer_1.0-5   RCurl_1.95-4.1       Rsamtools_1.16.0
[25] RSQLite_0.11.4       sendmailR_1.1-2      splines_3.1.0
[28] statmod_1.4.19       stats4_3.1.0         stringr_0.6.2
[31] survival_2.37-7      tools_3.1.0          XML_3.98-1.1
[34] xtable_1.7-3         XVector_0.4.0        zlibbioc_1.10.0

If I try to check the package status using,

> inst <- packageStatus()$inst
> inst[inst$Status != "ok", c("Package", "Version", "Status")]

I get:

Does it indicate that all the packages are uptodate, or otherwise?

Thanks
M

Thank You Devon.

The ecs data object is successfully created.

But shouldn't deprecated packages be automatically removed, or the authors have not updated the vignette (I am following the DEXSeq vignettte (last revision: 2013-10-08)).

And that's probably why I am now running into following errors:

> head( fData(ecs)$dispBeforeSharing )
Error in head(fData(ecs)$dispBeforeSharing) :
  error in evaluating the argument 'x' in selecting a method for function 'head': Error in (function (classes, fdef, mtable)  :
  unable to find an inherited method for function 'fData' for signature '"character"'
> ecs@dispFitCoefs
Error: trying to get slot "dispFitCoefs" from an object of a basic class ("character") with no slots
> head( fData(ecs)$dispFitted )
Error in head(fData(ecs)$dispFitted) :
  error in evaluating the argument 'x' in selecting a method for function 'head': Error in (function (classes, fdef, mtable)  :
  unable to find an inherited method for function 'fData' for signature '"character"'
> plotDispEsts( ecs )
Error in (function (classes, fdef, mtable)  :
  unable to find an inherited method for function 'plotDispEsts' for signature '"character"'
> ecs <- testForDEU( ecs )
Error in (function (classes, fdef, mtable)  :
  unable to find an inherited method for function 'sizeFactors' for signature '"character"'

Do you know of any current versions of the vignette, or a way around to solve these errors?

Thanks again
M

Hi M,

It looks like Alejandro forgot to remove the read.HTSeqCount() function from the source, even though it's set as being deprecated itself. Anyway, the vignette you're looking at is older than the version you have. If you just type vignette("DEXSeq") from within R you'll get the current one (it's already on your hard drive). You'll note that it lacks the read.HTSeqCounts() function. Further, the ExonCountSet (what the ecs variable stands for) class has itself been deprecated, so you're trying to use its accessors on a DEXSeqDataSet object (which is just an extension of a DESeqDataSet object). Have a look through the updated vignette and your life will be much easier :)

Thanks Devon for pointing in the right direction.

1 answer

This is likely due to you using a deprecated function for the version of DEXseq you have. read.HTSeqCounts() was replaced by DEXSeqDataSetFromHTSeq(), so try that instead.

Log in to answer this question.