desEQ2 eRROR

I have count matrix from feature count with gene_names for each sample. When I am using DESeqDataSetfromMatrix with the following commands:

count <- read.csv("matrix.count", header = TRUE, row.names = 1, sep ='t')
info <- read.table("coldata2.txt", header = TRUE, sep ='t')
library(DESeq2)
library(apeglm)
ds <- DESeqDataSetFromMatrix(count, info, ~condition)

Error: DESeqDataSet(se, design = design, ignoreRank) : NA values are not allowed in the count matrix.

any(is.na(count))
TRUE
all(is.numeric(count)
FALSE

I tried the following too:

ds <- DESeqDataSetFromMatrix(count, info, ~condition, tidy=TRUE)
ds <- DESeqDataSetFromMatrix(count, info, ~condition, tidy = FALSE)
 then I got repeatitive ids in row.names.

Kindly provide me the solution.

Read more here: Source link