ERROR: unable to find an inherited method for function ‘dispersions<-’ for signature ‘"DESeqDataSet",
1
0
Entering edit mode
aedavids ▴ 20
@aa611017
Last seen 2.6 years ago
United States

very strange. I have no idea what my bug might be.

My R script is launched/submitted using

docker exec -d -u studio R CMD $RSCRIPT

This is a partial snipit from the script

library("DESeq2") # version 1.32.0
library("BiocParallel")

countMatrixDF <- read.table(countMatrixFile, sep=delimator, header=TRUE)

# convert the data frame to matrix
# [,-1] means drop the first column
countMatrix <- data.matrix( countMatrixDF[,-1] )

colDataDF <- read.table(colDataFile, 
                        sep=delimator, 
                        header=TRUE,
                        stringsAsFactors = TRUE
                        )

# create a DESeqDataSetFromMatrix object
# use round to convert numReads from double to integer
dds <- DESeqDataSetFromMatrix(countData = round(countMatrix),
                              colData = colDataDF,
                              design = as.formula(design) )

dispersions(dds) <- estimateDispersions( dds )

output

converting counts to integer mode
  the design formula contains one or more numeric variables with integer values,
  specifying a model with increasing fold change for higher values.
  did you mean for this to be a factor? if so, first convert
  this variable to a factor using the factor() function
  the design formula contains one or more numeric variables that have mean or
  standard deviation larger than 5 (an arbitrary threshold to trigger this message).
  Including numeric variables with large mean can induce collinearity with the intercept.
  Users should center and scale numeric variables in the design to improve GLM convergence.
gene-wise dispersion estimates
mean-dispersion relationship
final dispersion estimates
Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘dispersions<-’ for signature ‘"DESeqDataSet", "DESeqDataSet"’
Calls: dispersions<- -> <Anonymous>
Execution halted

this is my docker build file

FROM bioconductor/bioconductor_docker:RELEASE_3_13

# install required R packages
RUN R -e ' BiocManager::install("DESeq2") '
RUN R -e ' BiocManager::install("apeglm") '
RUN R -e ' BiocManager::install("tximport") '

RUN R -e ' install.packages("tidyr") '
RUN R -e ' install.packages("readr") '
RUN R -e ' install.packages("dplyr") '
RUN R -e ' install.packages("rjson") '
RUN R -e ' install.packages("rmarkdown") '
RUN R -e ' install.packages("argparse") '

Any suggestions would be greatly appreciated

Andy

DESeq2 dese • 1.7k views
ADD COMMENT
0
Entering edit mode

dds <- estimateDispersions(dds) and not dispersion(dds)

ADD REPLY
1
Entering edit mode
@mikelove
Last seen 17 hours ago
United States

This is not the DESeq2 syntax, see vignette or functions man pages.

ADD COMMENT
0
Entering edit mode

thanks. It works now!

ADD REPLY

Login before adding your answer.

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