Question: DESeq2 Error in data.frame(row.names = colnames(countdata), condition) : row names supplied are of the wrong length
0
gravatar for suvratha
8 weeks ago by
suvratha40
Ulm
suvratha40 wrote:

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 deseq2 R • 189 views
ADD COMMENTlink modified 8 weeks ago by dsull1.2k • written 8 weeks ago by suvratha40
2
gravatar for dsull
8 weeks ago by
dsull1.2k
UCLA
dsull1.2k wrote:

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 COMMENTlink written 8 weeks ago by dsull1.2k

thank you, this fixed it!

ADD REPLYlink written 7 weeks ago by suvratha40
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 854 users visited in the last hour