DESeq2 Error in .Primitive("c")(<S4 object of class "GRangesList">
2
0
Entering edit mode
erin.gill81 ▴ 60
@eringill81-6831
Last seen 5.3 years ago
Canada

Hello,

I am attempting to re-run a script to find differentially expressed genes using DESeq2 that ran correctly two days ago. Since then, I updated R from version 3.3.2 to version 3.3.3. When attempting to call the DESeq function today, I get the following error:

Error in .Primitive("c")(<S4 object of class "GRangesList">, <S4 object of class "GRangesList">,  :
  could not find symbol "recursive" in environment of the generic function

I have updated the GenomicRanges package, but this has not fixed the problem.

Does anybody know what the problem might be? Should I revert to version 3.3.2 of R for the time being?

Thanks!

Erin

 

I've pasted my code below.

###################################################################

samples = read.csv("samples.csv",header=TRUE)

#remove libraries that have fewer than 750,000 reads
samples<-samples[samples$libsize >= 750000, ]

#start edgeR, which you will use to make the count matrix
library("edgeR")

#proceed to read in count data from .count files, filter counts
counts = readDGE(samples$countf)$counts
noint = rownames(counts) %in%
 
  c("__no_feature","__ambiguous","__too_low_aQual",
    
    "__not_aligned","__alignment_not_unique")

cpms = cpm(counts)

keep = rowSums(cpms >3) >=2 & !noint

counts = counts[keep,]

colnames(counts) = samples$shortname

#attach the column data to from the sample sheet to the variable coldata
coldata = with(samples,data.frame(shortname = I(shortname), condition = condition))

#attach the count data to the variable countdata
countdata = counts

#start DESeq2
library("DESeq2")

#construct your DESeq2 data set, making sure to specify the design matrix here
dds <- DESeqDataSetFromMatrix(countData = countdata,
                              colData = coldata,
                              design = ~ condition)

#run DESeq2 on the dataset
dds <- DESeq(dds, parallel=TRUE)

 

###########################################

My sample sheet is as follows:

LibraryName LibraryLayout SamplePrep fastq1 shortname condition countf libsize
L1 single KAPA L1.fastq.gz L1 control counts/L1.count 799470
L2 single KAPA L2.fastq.gz L2 control counts/L2.count 2392311
L3 single KAPA L3.fastq.gz L3 control counts/L3.count 2210542
N1 single KAPA N1.fastq.gz N1 NaNO2 counts/N1.count 2899109
N2 single KAPA N2.fastq.gz N2 NaNO2 counts/N2.count 1430
N3 single KAPA N3.fastq.gz N3 NaNO2 counts/N3.count 3846171
E1 single KAPA E1.fastq.gz E1 EDTA counts/E1.count 1657224
E2 single KAPA E2.fastq.gz E2 EDTA counts/E2.count 751472
E3 single KAPA E3.fastq.gz E3 EDTA counts/E3.count 1820830
C1 single KAPA C1.fastq.gz C1 NaNO2.EDTA counts/C1.count 3385405
C2 single KAPA C2.fastq.gz C2 NaNO2.EDTA counts/C2.count 883168
C3 single KAPA C3.fastq.gz C3 NaNO2.EDTA counts/C3.count 4245484

#######################################################

sessionInfo()

R version 3.3.3 (2017-03-06)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.2 LTS

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

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

other attached packages:
 [1] ggplot2_2.2.1              gplots_3.0.1               RColorBrewer_1.1-2        
 [4] DESeq2_1.14.1              SummarizedExperiment_1.4.0 Biobase_2.34.0            
 [7] GenomicRanges_1.26.3       GenomeInfoDb_1.10.3        IRanges_2.8.1             
[10] S4Vectors_0.12.1           BiocGenerics_0.20.0        edgeR_3.16.5              
[13] limma_3.30.12             

loaded via a namespace (and not attached):
 [1] genefilter_1.56.0    gtools_3.5.0         locfit_1.5-9.1       splines_3.3.3       
 [5] lattice_0.20-34      colorspace_1.3-2     htmltools_0.3.5      base64enc_0.1-3     
 [9] survival_2.40-1      XML_3.98-1.5         foreign_0.8-67       DBI_0.6             
[13] BiocParallel_1.8.1   plyr_1.8.4           stringr_1.2.0        zlibbioc_1.20.0     
[17] munsell_0.4.3        gtable_0.2.0         caTools_1.17.1       htmlwidgets_0.8     
[21] memoise_1.0.0        labeling_0.3         latticeExtra_0.6-28  knitr_1.15.1        
[25] geneplotter_1.52.0   AnnotationDbi_1.36.2 htmlTable_1.9        Rcpp_0.12.9         
[29] KernSmooth_2.23-15   acepack_1.4.1        xtable_1.8-2         scales_0.4.1        
[33] backports_1.0.5      checkmate_1.8.2      gdata_2.17.0         Hmisc_4.0-2         
[37] annotate_1.52.1      XVector_0.14.0       gridExtra_2.2.1      digest_0.6.12       
[41] stringi_1.1.2        grid_3.3.3           tools_3.3.3          bitops_1.0-6        
[45] magrittr_1.5         lazyeval_0.2.0       RCurl_1.95-4.8       tibble_1.2          
[49] RSQLite_1.1-2        Formula_1.2-1        cluster_2.0.5        Matrix_1.2-8        
[53] data.table_1.10.4    assertthat_0.1       rpart_4.1-10         nnet_7.3-12
 
 
deseq2 genomicranges differential gene expression • 1.2k views
ADD COMMENT
0
Entering edit mode
@martin-morgan-1513
Last seen 4 months ago
United States

Please see these questions A: Combining RangedData objects is broken (IRanges 2.8.1 with R version 3.3.3 RC) A: rGADEM error retrieving sequences. I think the problem is from installing a new R over an old package library; while in principle this is supposed to work, it clearly is not.

ADD COMMENT
0
Entering edit mode
erin.gill81 ▴ 60
@eringill81-6831
Last seen 5.3 years ago
Canada

Thank you for your response, Martin.

I have also managed to fix the error by omitting

parallel=TRUE

from the last line of my code. Therefore, the issue may actually lie in the BiocParallel library.

ADD COMMENT

Login before adding your answer.

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