Hello'
I have an error of ncol(countData) == nrow(colData) is not TRUE when I tried to set matrix. Code is below:
countdata = read.table('k.txt', header=TRUE, sep = "\t", row.names = 1, as.is=TRUE)
show(countdata) countdata <- as.matrix(countdata)
head(countdata)
condition <- factor(c(rep("x", 2), rep("y", 2),rep("z", 2),rep("t", 2)))
show(condition)
library(DESeq2)
coldata <- data.frame(skip=colnames(countdata), condition)
show(coldata)
dds <- DESeqDataSetFromMatrix(countData=countdata, colData=coldata, design=~condition) # here is it gave an error
dds <- DESeq(dds)
Also my data file like this
x y z t
b1 5 6 7 8
b2 3 4 5 6
Could you help me? Thanks
I can not debug this one. I guess i have problem about generating coldata but I still could not figure out
Maybe you can connect with a bioinformatics group at your institute to work through use of R? Basically you need to provide DESeq2 with the correct data first and it checks to see if basic rules have been followed. One of these is that the sample information is consistent with the number of samples. You can also try to learn about using R online, from eg the free courses or Quick-R.
Hi,
I also have the same problem, even though everything looks okay.
Error in DESeqDataSetFromMatrix(countData = my_counts, colData = my.metadata, : ncol(countData) == nrow(colData) is not TRUE
I also double checked the order of sample names, they are the same. Any idea how to solve this?
Is
my_counts
a matrix? try coercing itmy_counts = as.matrix(my_counts)
.Thanks for you reply. Yes, indeed it's a matrix.
Can you post the classes of everything and your actual code?
E.g.
etc.