Error in assay colnames when defining DESeqDataSetFromMatrix following R update
2
1
Entering edit mode
cagenet34 ▴ 20
@cagenet34-10910
Last seen 2.6 years ago
Toulouse, France, INRA

Hello,

I updated today for R version 3.3.0. When I defined DESeqDataSetFromMatrix, I obtained this error which was not the case with R version 3.2.5. when I switched with R-studio from one version to another, the error is still present with the version3.3.0

Any help will be valuable, Thanks in Advance.

Here are my code

AMHdup<-read.csv(file="count_genes_8indi_RmDup.csv", sep = ";",header=TRUE,row.names=1 )

library(DESeq2)
library(HTSFilter)
coldatafile<-read.table(file="colData.txt",sep="\t",header=TRUE,row.names=1)
dds<-DESeqDataSetFromMatrix(countData = AMHdup,
                            colData = coldatafile,
                            design = ~ Treatment)
Error in FUN(X[[i]], ...) : 
  assay colnames() must be NULL or equal colData rownames()



R version 3.3.0 (2016-05-03)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

locale:
[1] LC_COLLATE=French_France.1252  LC_CTYPE=French_France.1252    LC_MONETARY=French_France.1252 LC_NUMERIC=C                  
[5] LC_TIME=French_France.1252    

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

other attached packages:
[1] HTSFilter_1.12.0           DESeq2_1.12.3              SummarizedExperiment_1.2.3 Biobase_2.32.0            
[5] GenomicRanges_1.24.1       GenomeInfoDb_1.8.2         IRanges_2.6.0              S4Vectors_0.10.1          
[9] BiocGenerics_0.18.0       

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.5          RColorBrewer_1.1-2   plyr_1.8.4           XVector_0.12.0       tools_3.3.0          zlibbioc_1.18.0     
 [7] rpart_4.1-10         RSQLite_1.0.0        annotate_1.50.0      gtable_0.2.0         lattice_0.20-33      Matrix_1.2-6        
[13] DBI_0.4-1            DESeq_1.24.0         gridExtra_2.2.1      genefilter_1.54.2    cluster_2.0.4        locfit_1.5-9.1      
[19] grid_3.3.0           nnet_7.3-12          data.table_1.9.6     AnnotationDbi_1.34.3 XML_3.98-1.4         survival_2.39-4     
[25] BiocParallel_1.6.2   foreign_0.8-66       limma_3.28.6         latticeExtra_0.6-28  Formula_1.2-1        edgeR_3.14.0        
[31] geneplotter_1.50.0   ggplot2_2.1.0        Hmisc_3.17-4         scales_0.4.0         splines_3.3.0        colorspace_1.2-6    
[37] xtable_1.8-2         acepack_1.3-3.3      munsell_0.4.3        chron_2.3-47        
 

>

>

deseq2 colData rownames • 7.4k views
ADD COMMENT
3
Entering edit mode
@mikelove
Last seen 48 minutes ago
United States

This is a new check from SummarizedExperiment (a dependency of DESeq2)

I'd first check the colnames and rownames to make sure they are in a consistent order:

colnames(AMHdup)
rownames(coldatafile)

If these are as you expected but just not equal, then assign NULL to the colnames of the assay and continue.

colnames(AMHdup) <- NULL
ADD COMMENT
0
Entering edit mode
cagenet34 ▴ 20
@cagenet34-10910
Last seen 2.6 years ago
Toulouse, France, INRA
ok it works. Thank

> dds<-DESeqDataSetFromMatrix(countData = AMHdup,
+ colData = coldatafile,
+ design = ~ Treatment)
Error in FUN(X[[i]], ...) :
  assay colnames() must be NULL or equal colData rownames()
> colnames(AMHdup)
[1] "X6Sum"  "X8Sum"  "X9Sum"  "X10Sum" "X14Sum" "X15Sum" "X16Sum" "X17Sum"
> rownames(coldatafile)
[1] "6Sum"  "8Sum"  "9Sum"  "10Sum" "14Sum" "15Sum" "16Sum" "17Sum"
> colnames(AMHdup) <- NULL
> dds
Error: object 'dds' not found
> dds<-DESeqDataSetFromMatrix(countData = AMHdup,
+                             colData = coldatafile,
+                             design = ~ Treatment)
> dds$Treatment<- relevel(dds$Treatment, ref ="CTRL")
> dds
class: DESeqDataSet 
dim: 27054 8 
metadata(1): version
assays(1): counts
rownames(27054): ENSOARG00000000001 ENSOARG00000000002 ... ENSOARG00000027056 ENSOARG00000027057
rowData names(0):
colnames(8): 6Sum 8Sum ... 16Sum 17Sum
colData names(1): Treatment
> dds1<-dds
> dds1
class: DESeqDataSet 
dim: 27054 8 
metadata(1): version
assays(1): counts
rownames(27054): ENSOARG00000000001 ENSOARG00000000002 ... ENSOARG00000027056 ENSOARG00000027057
rowData names(0):
colnames(8): 6Sum 8Sum ... 16Sum 17Sum
colData names(1): Treatment
> dds1<-DESeq(dds1) # on lance l'analyse différentielle
estimating size factors
estimating dispersions
gene-wise dispersion estimates
mean-dispersion relationship
final dispersion estimates
fitting model and testing
> filterHTS<-HTSFilter(dds1,s.len=500, plot=TRUE)$filteredData # on obtient un seuil de 23.889
> class(filterHTS) # on a bien un objet DESEQ2
[1] "DESeqDataSet"
attr(,"package")
[1] "DESeq2"
> dim(filterHTS) # on réduit à 12700
[1] 12700     8
ADD COMMENT

Login before adding your answer.

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