DeSeq2 error: counts matrix should be numeric, currently it has mode: character
1
0
Entering edit mode
imran khan • 0
@imran-khan-23571
Last seen 5.5 years ago
Canada/London/Western University

Hi there, Is there any way to get rid of this while creating object for Deseq2. I used script: dds <- DESeqDataSetFromMatrix(countData = cts, colData = coldata, design = ~ condition) Error in DESeqDataSet(se, design = design, ignoreRank) : counts matrix should be numeric, currently it has mode: character

I check my count matrix and I don't see any character specified only numeric values except row names as genes and colum names as samples. Then I also run the script to see if my count matric is numeric
all(is.numeric(cts)) False I don't know where creating dds showing me this error. I will appreciate your help in this matter. Best: Imran

deseq2 • 7.7k views
ADD COMMENT
0
Entering edit mode

Please don't cross post to Bioc and biostars without making a note. You make more people do legwork than is necessary.

https://www.biostars.org/p/439584/

ADD REPLY
0
Entering edit mode

My apologies. I was not aware of this regulation. Will comply with 100% and fully noted for the future as well.

ADD REPLY
1
Entering edit mode
@mikelove
Last seen 2 days ago
United States

When you read the counts matrix into R, use stringsAsFactors=FALSE. Note that this default of turning strings into factors in the background has been removed in R 4.0.0.

ADD COMMENT

Login before adding your answer.

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