Error in DESeqDataSet(se, design = design, ignoreRank) : some values in assay are negative
1
0
Entering edit mode
2.5 years ago

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 • 2.6k views
ADD COMMENT
0
Entering edit mode
2.5 years ago
ATpoint 86k

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.

ADD COMMENT

Login before adding your answer.

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