This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Error in DESeqDataSet(se, design = design, ignoreRank) : some values in assay are negative

Hello everyone!

I'm new at RNAseq analysis, sorry if it is a basic question, I tried search online but none of those tips helped me. Well, I've tried to perform DESeq2 from a public data avaliable on GEO (GSE198437) with the following codes

dds <- DESeqDataSetFromMatrix(countData=countsdata, colData=coldata, design=~condition)

Before that, I've remove the 3 first columns (gene name, gene code and ID) and made a matrix.

But I keep getting this following error:

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

I use any(countsdata < 0) and give me TRUE for negative values, but when I take a look at my matrix I don't see any negative value.

Anyone knows what can I do to perform "DESeqDataSetFromMatrix" in this case?

deseq2 values deseqdatasetfrommatrix negative

1 answer

Odd, this here works for me, using the supplementary file they provide:

suppressMessages({
  library(DESeq2)
  library(data.table)
})

  dat <-
    data.table::fread("https://ftp.ncbi.nlm.nih.gov/geo/series/GSE198nnn/GSE198437/suppl/GSE198437_Raw_gene_count_matrix.txt.gz")

  dat_counts <- dat[,5:ncol(dat)]
  rownames(dat_counts) <- dat$Geneid 
  dat_coldata <- data.frame(group=factor(gsub("-.*", "", colnames(dat_counts))))

  dds <- DESeqDataSetFromMatrix(countData=dat_counts, colData=dat_coldata, design=~group)
Created on 2022-06-21 by the reprex package (v2.0.1)

Oh, and be careful, gene "SYMBOL" contains the infamous 1-Mar like genes so converted from Excel into dates, so better make a new assignment using the Entrez Geneid back to symbols.

Log in to answer this question.