DESeq2 Trouble shoot
1
0
Entering edit mode
5.2 years ago
jaqx008 ▴ 110

Hey all, I recently ran DESeq2 analysis succesfully but I mad changes to my count table and wanting to rerun it in R. I encountered an error as before and followed all the steps I have written down in my documentation but still getting the error when I try to make dds. I could not figure out what I am doing wrong in either my count table or conditions table. both shown below. Error

Error in DESeqDataSetFromMatrix(countData = Amphcts, colData =
 coldata,  :    ncol(countData) == nrow(colData) is not TRUE

Conditions.csv

Sample,Condition,Replicate
Untreated1,Untreated,1
Untreated2,Untreated,2
Untreated3,Untreated,3
Untreated4,Untreated,4
Treated1,Treated,1
Treated2,Treated,2
Treated3,Treated,3
Treated4,Treated,4

count.txt

    Untreated1  Untreated2  Untreated3  Untreated4  Treated1    Treated2    Treated3    Treated4
Bf_V2_1:1:797   0   0   0   0   0   0   0   0
Bf_V2_1:72:637397   3227    3149    3150    3085    4068    4019    4122    4075
DESeq2 • 2.4k views
ADD COMMENT
0
Entering edit mode

The error message tells you explicitly what's wrong, pointing you to what you should investigate:

Error in DESeqDataSetFromMatrix(countData = Amphcts, colData = coldata, : ncol(countData) == nrow(colData) is not TRUE

The number of columns in the countdata ncol(countData) doesn't match the number of rows in the sample info nrow(colData). Don't panic when you get an error message, but read it carefully.

ADD REPLY
1
Entering edit mode
5.2 years ago

Look at the first row of Amphcts and coldata. It's likely that either coldata still has the header row as a normal row or that Amphcts has the row names as a column. Either one of those will cause this.

ADD COMMENT
0
Entering edit mode

Thanks for your suggestion. have looked at the coldata and cts data. I have tried to adjust it in different ways but I am getting the same error and its frustrating. However, in my count data, if I remove the loci column, it generates my graph as expected, but I do need the loci info to be in the log2fold change information at the end.

ADD REPLY
0
Entering edit mode

The loci should be row names, not a column.

ADD REPLY
0
Entering edit mode

Thanks I think I understand it better now. Thanks again

ADD REPLY

Login before adding your answer.

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