DESeq2 "DESeqDataSetFromMatrix" error
1
3
Entering edit mode
6.1 years ago
Ricky ▴ 50

Dear all,

I am trying to calculate differential gene expression in DESeq2 for a simple two condition experiment with three replicates for each condition. After loading the DESeq2 library I load my count table using:

countData <- as.matrix(read.table("combined.counts.CvsT.txt", header = T, row.names = 1))
> head(countData)
      Col0C1 Col0C2 Col0C3 Col0T1 Col0T2 Col0T3
AT1G01010    756    225    331    445    941    676
AT1G01020    346    207    256    516    474    264
AT1G01030     45     36     23     32     67     63
AT1G01040   1675   1163   1671   2914   3335   2065
AT1G01046     10      6      6     17     32     18
AT1G01050   2035   1541   1946   2833   3320   2012

In order to create the experimental design/meta table I do:

colData <- data.frame(condition=ifelse(grepl("Col0C", colnames(countData)), "control", "triggered"))

rownames(colData) <- colnames(countData)

colData
   condition
Col0C1   control
Col0C2   control
Col0C3   control
Col0T1 triggered
Col0T2 triggered
Col0T3 triggered

When I then try to calculate differential expression, I get the following error:

> dds <- DESeqDataSetFromMatrix(countData, colData, formula(~ condition))
Error in DESeqDataSetFromMatrix(countData, colData, formula(~condition)) : 

  could not find function "DESeqDataSetFromMatrix"

I am using R Studio, but I don't think this is a problem of DESeq2 (it also happens when I run the script in the console version of R) but rather of the script I use to generate the metatable. Does anyone have an idea what's going wrong? My session info is:

R version 3.4.2 (2017-09-28)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

Matrix products: default

locale:
[1] LC_COLLATE=German_Germany.1252  LC_CTYPE=German_Germany.1252    LC_MONETARY=German_Germany.1252
[4] LC_NUMERIC=C                    LC_TIME=German_Germany.1252    

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

other attached packages:
[1] SummarizedExperiment_1.8.1 DelayedArray_0.4.1         matrixStats_0.53.1        
[4] Biobase_2.38.0             GenomicRanges_1.30.0       GenomeInfoDb_1.14.0       
[7] IRanges_2.12.0             S4Vectors_0.16.0           BiocGenerics_0.24.0       

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.16           compiler_3.4.2         pillar_1.2.1           RColorBrewer_1.1-2    
 [5] plyr_1.8.4             XVector_0.18.0         bitops_1.0-6           base64enc_0.1-3       
 [9] tools_3.4.2            zlibbioc_1.24.0        rpart_4.1-13           tibble_1.4.2          
[13] gtable_0.2.0           lattice_0.20-35        rlang_0.2.0            Matrix_1.2-12         
[17] GenomeInfoDbData_1.0.0 cluster_2.0.6          nnet_7.3-12            grid_3.4.2            
[21] survival_2.41-3        BiocParallel_1.12.0    foreign_0.8-69         latticeExtra_0.6-28   
[25] Formula_1.2-2          ggplot2_2.2.1          scales_0.5.0           splines_3.4.2         
[29] colorspace_1.3-2       acepack_1.4.1          RCurl_1.95-4.10        lazyeval_0.2.1        
[33] munsell_0.4.3

Thanks al lot. Ricky

RNA-Seq DESeq2 Differential Expression rna-seq • 16k views
ADD COMMENT
4
Entering edit mode
6.1 years ago

I don't see DESeq2 in your sessionInfo(), how did you load it?

ADD COMMENT
0
Entering edit mode

I use:

    > library(DESeq2)
Lade nötiges Paket: S4Vectors
Lade nötiges Paket: stats4
Lade nötiges Paket: BiocGenerics
Lade nötiges Paket: parallel

I apparently receive a number of warning messages, e.g.:

    Error: package or namespace load failed for ‘DESeq2’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
 es gibt kein Paket namens ‘gridExtra’
In addition: Warning messages:
1: Paket ‘SummarizedExperiment’ wurde unter R Version 3.4.3 erstellt 
2: Paket ‘matrixStats’ wurde unter R Version 3.4.3 erstellt 


Attache Paket: ‘BiocGenerics’

Could these cause trouble?

calling loaded packages lists:

    > (.packages())
 [1] "SummarizedExperiment" "DelayedArray"         "matrixStats"          "Biobase"             
 [5] "GenomicRanges"        "GenomeInfoDb"         "IRanges"              "S4Vectors"           
 [9] "BiocGenerics"         "parallel"             "stats4"               "stats"               
[13] "graphics"             "grDevices"            "utils"                "datasets"            
[17] "methods"              "base"
ADD REPLY
3
Entering edit mode

As you can see from the error message (if you can read German at least), you need to install the gridExtra package.

ADD REPLY
1
Entering edit mode

Thanks,

installing gridExtra and yaml helped!

ADD REPLY
0
Entering edit mode

That's an error, not a warning. Try to reinstall DESeq2.

ADD REPLY
0
Entering edit mode

Nice tip, in my case I couldn't access the function because I didn't have the most up-to-date "matrixStats" package. Installing that and reloading DeSeq2 fixed it.

ADD REPLY

Login before adding your answer.

Traffic: 2698 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