DESeqDataSetFromMatrix NA values
1
0
Entering edit mode
hyejo • 0
@4aaa2817
Last seen 17 months ago
South Korea

Enter the body of text here

Code should be placed in three backticks as shown below

> dds <- DESeqDataSetFromMatrix(countData = cts,
+                               colData = coldata,
+                               design = ~ condition)
Error in DESeqDataSet(se, design = design, ignoreRank) : 
  NA values are not allowed in the count matrix

> any(is.na(cts))
[1] TRUE
> all(is.numeric(cts))
[1] TRUE


Hello, 
I don't have any missing values in my data, but I keep getting such message. 
Dose anybody know the solution? Thanks
DESeq2 • 1.4k views
ADD COMMENT
0
Entering edit mode
ATpoint ★ 4.5k
@atpoint-13662
Last seen 8 hours ago
Germany

You have NAs in your matrix, simple as that. The check that runs internally is really just a any(is.na(cts)). Your check is.numeric() is not informative, as NAs in a numeric matrix are also numeric.

This is TRUE: is.numeric(matrix(c(1,NA)))

You can see the rows in which there are NAs with something like:

# The second row has NAs
cts <- matrix(c(1,4,3,5,6,3,NA,8), 2, byrow=TRUE)
rowsWithNAs <- which(rowSums(is.na(cts))>0)
cts[rowsWithNAs,]
ADD COMMENT

Login before adding your answer.

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