DESeq2 Error in data.frame(row.names = colnames(countdata), condition) : row names supplied are of the wrong length
1
0
Entering edit mode
22 months ago
suvratha ▴ 60

Hello,

I'm getting the following error in DESeq2 after following the steps below -

data <- read.table("data.tsv", sep="\t", header=T, as.is=T) countdata <- as.matrix(data[,2:2378]) condition <- as.factor(c(rep("L45", 442), rep("GABA", 1936))) coldata <- data.frame(row.names=colnames(countdata), condition) Error in data.frame(row.names = colnames(countdata), condition) : row names supplied are of the wrong length

any idea why this is happening? the columns are the samples and rows are genes.

Thank you for your help.

Suvi

RNA-Seq rna-seq R DESeq2 • 2.4k views
ADD COMMENT
2
Entering edit mode
22 months ago
dsull ★ 2.5k

condition contains 2378 elements. But it appears that there are 2377 columns in your countdata matrix.

The line: countdata <- as.matrix(data[,2:2378]) means your matrix will have 2377 columns (because you are skipping the first column and retaining columns #2 through #2378).

ADD COMMENT
0
Entering edit mode

thank you, this fixed it!

ADD REPLY

Login before adding your answer.

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