Error while running DESeq2
0
0
Entering edit mode
srikar • 0
@356ba525
Last seen 21 days ago
India
This is my code :- 
library(DESeq2)
library(ggplot2)
countData <- read.csv('/home/keshav/Downloads/gene_count_matrix.csv', header = TRUE,sep = ",")
countData <- as.matrix(countData)
rownames(countData) <- countData[ , 1]
countData = as.matrix(countData[ , -1])
head(countData)
(condition <- factor(c("Normal","Tumor","Normal","Tumor")))
(coldata <- data.frame(row.names=colnames(countData), condition))
dds <- DESeqDataSetFromMatrix(countData=countData, 
                              colData=coldata, 
                              design=~condition)
dds
The error I'm facing is :-
Error in DESeqDataSet(se, design = design, ignoreRank) : 
  some values in assay are negative

Please advise.

```

DifferentialExpression • 206 views
ADD COMMENT
0
Entering edit mode

I suggest you to check your counts matrix because there shouldn't be negative raw counts in this matrix. You should investigate why : is it your own count matrix?, did you perform any modifications before?, have you downloaded it somewhere else?

ADD REPLY
0
Entering edit mode

I have generated the gene count matrix manually . Upon downloading the data from sra, perfomed fastqc analysis and then proceeded with trimmomatic to trim the low quality reads. Then i made use of hisat2 to align it to a reference genome and upon doing so, made use of samtools to generate sorted bam files. I then proceeded with stringtie to generate a gene count matrix. This is the procedure i followed.

ADD REPLY
1
Entering edit mode

You don't need stringtie unless you want to assemble a transcriptome. Just use featureCounts to make your count matrix. It will do fine, and will not make any mess.

ADD REPLY
0
Entering edit mode

Okay. Thank you.

ADD REPLY
0
Entering edit mode

Your error might stem from stringie then, unfortunately I do not use it and I think you would have a better answer by opening a github issue (it seems this error already happened here : https://github.com/gpertea/stringtie/issues/69). You could first check that you have indeed negative values in your raw counts with sum(countData<0)

ADD REPLY
0
Entering edit mode

Thank you . I will look into it, and upon running sum(countData<0), out of 231780 elements, 231642 of those are below 0. I think it may be an issue with stringtie. I will try running another tool to generate the count matrix.

ADD REPLY

Login before adding your answer.

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