Error in DESeqDataSetFromMatrix
1
0
Entering edit mode
4.3 years ago
hazemfma • 0

Good day everyone. As I'm trying to run a DE analyze, I'm getting this error over and over. I have seen that many people ran into that same error at some point while performing DESeq2 but I haven't seen an answer that I am able to follow to get it solved. Can anyone help with that?

> CountTable <- read.delim("~/Downloads/totalreadcount.txt")

> sampleTable <- data.frame(row.names=c("405-8wInf","410-8wUninf","415-8wInf","416-8wUninf","420-8wUninf","422-8wInf","424-8wUninf","426-8wInf","431-8wInf","443-8wUninf","460-8wInf","405-20wInf","410-20wUninf","415-20wInf","416-20wUninf","420-20wUninf","422-20wInf","424-20wUninf","426-20wInf","431-20wInf","443-20wUninf","460-20wInf"),condition=as.factor(c("8wInf","8wUninf","8wInf","8wUninf","8wUninf","8wInf","8wUninf","8wInf","8wInf","8wUninf","8wInf","20wInf","20wUninf","20wInf","20wUninf","20wUninf","20wInf","20wUninf","20wInf","20wInf","20wUninf","20wInf")))

> dds <- DESeqDataSetFromMatrix(countData=CountTable, colData=sampleTable, design=~condition)
Error in DESeqDataSetFromMatrix(countData = CountTable, colData = sampleTable,  : 
  ncol(countData) == nrow(colData) is not TRUE
rna-seq R DEseq2 • 1.9k views
ADD COMMENT
0
Entering edit mode
4.3 years ago
padwalmk ▴ 140

Hi, This is due to colnames of the count table and rownames of the sampleTable doesnot match. You can change the column name of the count table in R:

colname(Count)[1:n] <- row.names(sampleTable)

n is the number of sample. Also check the sequence of sample in count table.

ADD COMMENT

Login before adding your answer.

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