Question: NA values of count matrix in class DESeqDataSet
gravatar for maleknias
5 months ago by
maleknias0 wrote:

Dear all


I downloaded a data set in class "RangedSummarizedExperiment" from "". I want to find differential expression genes. My code is :



[1] "RangedSummarizedExperiment"


[1] "SummarizedExperiment"


>names= names(colData(rse_gene))

>write.table(data,file="colData.csv", col.names=names,sep="\t",row.names=FALSE)


>colData(rse_gene) =DataFrame(data1)

>colData(rse_gene)$disease.status = as.factor(colData(rse_gene)$disease.status)

>dds <- DESeqDataSet(rse_gene, design = ~ disease.status)

converting counts to integer mode Error in validObject(.Object) :

invalid class “DESeqDataSet” object: NA values are not allowed in the count matrix In addition: Warning message: In mde(x) : NAs introduced by coercion to integer range

I use two solution for this problem but both of them were useless:

1- Keep only rows with non-zero counts:

>rse_gene <- rse_gene[rowSums(assay(rse_gene)) != 0, ]

2- Replace the NA value by -9 :

>countdata <- assay(rse_gene)


>coldata <- colData(rse_gene)

>ddsMat <- DESeqDataSetFromMatrix(countData = countdata, colData = coldata, design = ~ disease.status)

I will be appreciate if any one can help me!!

ADD COMMENTlink written 5 months ago by maleknias0


Please post code for reproducing the error and the R session information you have. Thanks.

Also, why are you writing the colData() information to a text file and then reading it back into R? Are you editing the colData() information outside R?

Best, Leonardo

ADD REPLYlink written 4 months ago by Leonardo Collado Torres590
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 114 users visited in the last hour