Error in DESeqDataSet : some values in assay are not integers
1
1
Entering edit mode
c.e.chong ▴ 10
@cechong-24049
Last seen 13 months ago
United Kingdom

Hi all,

I'm trying to construct deseq2 dataset object using (I have microbiome data comparing three groups) :

countData <- read.csv('ddtry2000.csv',sep = ",", header = TRUE, row.names = 1)
metaData <- read.table('metadatakegg.txt', header = TRUE, sep = "\t", row.names = 1)
#construct deseq dataset object 
keggdds <- DESeqDataSetFromMatrix(countData=countData, 
                                  colData=metaData, 
                                  design=~scalp_site)

Here is a snippet of my countData:

         HH_S18     HH_S19      HH_S1     HH_S20      HH_S21     HH_S22     HH_S2
K00001   0.000000   0.000000   0.000000   0.000000    0.000000   0.000000   0.26893
K00002  18.509523  16.244886  54.630965 131.025864  183.579496  83.970474  35.15142
K00003 348.549251 441.184919 200.773243 493.427718 1117.861729 180.713892 582.49634
K00004   0.969867   0.000000   0.563153  37.426118    1.799646   5.725418  10.14712
K00005   0.000000   0.226449   0.475544   0.522645    0.165761   4.469203  24.36504
K00006  20.199058  23.003324  97.738354 303.029298  201.555840  67.906913  40.71181

Here is a snippet of my metadata:

                  scalp_site
    HH_S18          Healthy
    HH_S19          Healthy
    HH_S1           Healthy
    HH_S20          Healthy
    DD_S10         Dandruff
    DD_S12         Dandruff
    DD_S14         Dandruff
    DH_S17 Dandruff_Healthy
    DH_S7  Dandruff_Healthy
    DH_S9  Dandruff_Healthy

I keep getting this error message and I'm not sure how to ensure all the values are numeric. I would be grateful for any advice!

Error in DESeqDataSet(se, design = design, ignoreRank) : some values in assay are not integers

deseq2 metagenomics • 38k views
ADD COMMENT
1
Entering edit mode

While I am not quite familiar with metagenomic count matrices, it appears that perhaps your count data have been normalized in some way (hence non-integer counts). While the previous answer suggested rounding these values to the nearest integers, this is not a good protocol to follow if the table above is indeed one of normalized counts. Rather, you would input raw counts, which should be integral values. However, if these counts have not been normalized and are not integers for another reason, then rounding would make perfect sense.

ADD REPLY
16
Entering edit mode
Ram ▴ 220
@ram
Last seen 6 weeks ago
United States

DESeqDataSet needs countData to be non-negative integers. Try

keggdds <- DESeqDataSetFromMatrix(countData=round(countData), 
                                  colData=metaData, 
                                  design=~scalp_site)
ADD COMMENT
0
Entering edit mode

That worked! Thank you!

ADD REPLY
0
Entering edit mode

Please accept my answer by clicking on the green check mark on the left.

ADD REPLY

Login before adding your answer.

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