DESeqDataSetFromMatrix NA error while there is no NA in the data
1
0
Entering edit mode
lu.la • 0
@lula-20604
Last seen 3.8 years ago
Paris

Hi, When applying DESeqDataSetFromMatrix() I get this error: Error in DESeqDataSet(se, design = design, ignoreRank) : NA values are not allowed in the count matrix I checked in my counts file, there is not NA. So there must be something wrong in the importation of the data. Here is my code:

# importing the read counts
base <- as.character("./");
counts <- base::file.path(base, "Counts.csv");
counts <- utils::read.table(file = counts, header = TRUE, sep = ";");
counts <- data.frame(counts[,-1], row.names=counts[,1]);

# Creating the metadata
condition <- c("PreT","PreT","PreT","PreT","PreT","PreT","C6D28","C6D28","C6D28","C6D28","C6D28");
batch <- c("PD7154", "PD7155", "PD7153", "PD7151", "PD7156", "PD7157", "PD7155", "PD7153", "PD7151", "PD7156", "PD7157");
metadata <- data.frame(condition, batch);
rownames(metadata) <- c("PD7154", "PD7155", "PD7153", "PD7151_C1D1", "PD7156_C1D1", "PD7157_C1D1", "PD7155_C6D28", "PD7153_C6D28", "PD7151_C6D28", "PD7156_C6D28", "PD7157_C6D28");

# Testing that metadata fits with the counts 
all(rownames(metadata) == colnames(counts));

# Applying DESeqDataSetFromMatrix function
dds <- DESeqDataSetFromMatrix(
  countData = counts,
  colData = metadata,
  design = ~ batch + condition
  );

Bellow are my session info. Thanks for your help.

sessionInfo() R version 3.5.2 (2018-12-20) Platform: x86_64-apple-darwin15.6.0 (64-bit) Running under: macOS Mojave 10.14.3

Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib

locale: [1] C

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

other attached packages: [1] EnhancedVolcano1.0.1 ggrepel0.8.0 magrittr1.5
[4] limma
3.38.3 biomaRt2.38.0 pheatmap1.0.12
[7] RColorBrewer1.1-2 DESeq21.22.2 SummarizedExperiment1.12.0 [10] DelayedArray0.8.0 BiocParallel1.16.6 matrixStats0.54.0
[13] Biobase2.42.0 GenomicRanges1.34.0 GenomeInfoDb1.18.2
[16] IRanges
2.16.0 S4Vectors0.20.1 BiocGenerics0.28.0
[19] ggfortify0.4.5 broom0.5.1 forcats0.4.0
[22] stringr
1.4.0 purrr0.3.0 tidyr0.8.2
[25] tibble2.1.1 ggplot23.1.0 tidyverse1.2.1
[28] dplyr
0.8.0.1 DT0.5 readr1.3.1

loaded via a namespace (and not attached): [1] nlme3.1-137 bitops1.0-6 bit640.9-7
[4] lubridate
1.7.4 progress1.2.0 httr1.4.0
[7] tools3.5.2 backports1.1.3 R62.4.0
[10] rpart
4.1-13 DBI1.0.0 Hmisc4.2-0
[13] lazyeval0.2.1 colorspace1.4-0 nnet7.3-12
[16] withr
2.1.2 prettyunits1.0.2 tidyselect0.2.5
[19] gridExtra2.3 bit1.1-14 compiler3.5.2
[22] cli
1.1.0 rvest0.3.2 htmlTable1.13.1
[25] xml21.2.0 scales1.0.0 checkmate1.9.1
[28] genefilter
1.64.0 digest0.6.18 foreign0.8-71
[31] XVector0.22.0 base64enc0.1-3 pkgconfig2.0.2
[34] htmltools
0.3.6 htmlwidgets1.3 rlang0.3.1
[37] readxl1.3.0 RSQLite2.1.1 rstudioapi0.9.0
[40] generics
0.0.2 jsonlite1.6 acepack1.4.1
[43] RCurl1.95-4.11 GenomeInfoDbData1.2.0 Formula1.2-3
[46] Matrix
1.2-15 Rcpp1.0.1 munsell0.5.0
[49] yaml2.2.0 stringi1.3.1 zlibbioc1.28.0
[52] plyr
1.8.4 blob1.1.1 grid3.5.2
[55] crayon1.3.4 lattice0.20-38 haven2.1.0
[58] annotate
1.60.0 hms0.4.2 locfit1.5-9.1
[61] knitr1.21 pillar1.3.1 geneplotter1.60.0
[64] XML
3.98-1.17 glue1.3.0 latticeExtra0.6-28
[67] data.table1.12.0 modelr0.1.4 cellranger1.1.0
[70] gtable
0.2.0 assertthat0.2.1 xfun0.5
[73] xtable1.8-3 survival2.43-3 memoise1.1.0
[76] AnnotationDbi
1.44.0 cluster_2.0.7-1

deseq2 • 823 views
ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 14 hours ago
United States

You can debug yourself a bit: take a look at counts and find where the NAs are.

ADD COMMENT

Login before adding your answer.

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