-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error in DESeqDataSet : counts matrix should be numeric, currently it has mode: character #210
Comments
in the first column, you need to write genename or something. The number of columns in the header and table has to be same. In your case it isn't. |
Thank you. But clarification on my original problem: my data had 4 columns, not 5. The gene names are the row.names, not a column, and when you run dim() on the file it did say 4 columns. Exactly like the example file, where they had 6 columns plus gene names as row.names. So their row names were not numerical either. I just did not understand why that file would be allowed to run by DESeq. That said, I could totally make the gene names my first row. It just causes later complications because it seems that DESeq will mistake it as a column of samples. If there's a way to fix this problem then all these previous problems would not matter. I successfully ran one trial before, not sure why it stopped working... Here's the output from that run if it helps. class: DESeqDataSet |
Update: Actually, I was building a txt file from my HTSeq output so that I could use the DESeqDataSetFromMatrix function. So it's all good now... |
Good to know. |
Hello,
I encountered the above error while running DESeq. I know it's because I manually made the row.names of my matrix the name of the genes, but the example file ran with zero problems (https://informatics.fas.harvard.edu/differential-expression-with-deseq2.html). I checked that this file also has the gene names, instead of numericals, as the row names. I don't understand why they won't have the error message while I do.
This is what head(theirData) looks like: (dim = 6)
FBgn0000003 209 164 143 162 80 151
FBgn0000008 572 467 580 509 435 297
FBgn0000014 387 276 383 289 237 141
FBgn0000015 158 123 157 117 110 70
FBgn0000017 2351 2126 2885 2896 2041 1467
FBgn0000018 368 296 314 318 272 169
This is what head(myData) looks like: (dim = 4)
CHIP_DHT1 CHIP_DHT2 CHIP_VEH1 CHIP_VEH2
A1BG 16 10 23 17
A1BG-AS1 26 15 20 22
A1CF 62 61 83 56
A2M 46 33 46 46
A2M-AS1 16 19 18 16
A2ML1 51 50 56 61
Any help is appreciated. Thanks!
The text was updated successfully, but these errors were encountered: