This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Deseq2 dataframematrix error

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

I have raw counts of rna seq data with approxx 68 samples, im getting error in deseq dataset can you guys help me

countsTable <-read.csv("counts.csv", header = T, stringsAsFactors = FALSE)
head(countsTable)
sample_info <-read.table("sample.txt", header = T, stringsAsFactors = FALSE)
#rownames(countsTable) <-countsTable[,27902]
#countsTable <-countsTable[,1]
class(sample_info)
sample_info$Type <- as.factor(as.character(sample_info$Type))
library(DESeq2)
rownames(countsTable) <-countsTable[,1]
countsTable <-countsTable[,-1]
(dds<-DESeqDataSetFromMatrix(countsTable[,c(1:128)],colData = sample_info,design = ~Type))

when i run dds<-Deseqdatasetfrommatrix i get this error

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

My str(countsTable) shows i have int values 0,1,2,3,4 for diff samples

how to run dds for this kindly help.

deseq2 dataframmatrix

What does any(countsTable < 0) give you?

Some details then please. How did you obtain the counts, and please provide a head(countsTable).

You could also try feeding in truncated versions of the count data until you identify the offending row.

1 answer

Thank you guys it’s solved there was a minor mistake in sample_info that got me this error

Thank you all for your support

Can you tell here, what was that mistake? I am getting same error?

Log in to answer this question.