![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
DESeq without replicates | austinpa | Bioinformatics | 43 | 07-15-2014 07:38 PM |
DESeq problems | janec | Bioinformatics | 17 | 08-05-2013 05:44 AM |
DESeq different version | elisadouzi | Bioinformatics | 0 | 10-03-2011 02:10 PM |
DESeq package(1.5.24) | elisadouzi | Bioinformatics | 1 | 10-01-2011 03:02 AM |
DESeq: publications | crh | Bioinformatics | 1 | 12-18-2010 10:58 PM |
![]() |
|
Thread Tools |
![]() |
#1 |
Junior Member
Location: china Join Date: Sep 2010
Posts: 9
|
![]()
When I use DESeq, I don't seem to be able to get the newCountDataSet to work. I get this error:
> cds <- newCountDataSet(mydata,conds) Error in round(countData) : Non-numeric argument to mathematical function > head(mydata) V1 V2 V3 1 zhu1_Ghi#S28631427 8.9990205 10.5918948 2 zhu1_Ghi#S28631527 0.4181748 0.3937552 3 zhu1_Ghi#S28631546 7.4275293 24.3262365 4 zhu1_Ghi#S28631624 11.5885114 9.8558116 5 zhu1_Ghi#S28631691 0.8391944 10.7992493 6 zhu1_Ghi#S28631709 3.8783566 4.2137042 > str(mydata) 'data.frame': 18634 obs. of 3 variables: $ V1: Factor w/ 18634 levels "zhu1_Ghi#S28631416",..: 2 4 5 6 7 8 9 10 11 12 ... $ V2: num 8.999 0.418 7.428 11.589 0.839 ... $ V3: num 10.592 0.394 24.326 9.856 10.799 ... How can I solve this problem? |
![]() |
![]() |
![]() |
#2 |
Senior Member
Location: US Join Date: Jan 2009
Posts: 392
|
![]()
I am not certain, but my guess is that the problem is how you named your gene-name column. V1 is probably not a good choice when your other columns are named V2 and V3. DESeq is probably thinking V1 is a sample. Try renaming that column to something else.
|
![]() |
![]() |
![]() |
#3 |
Senior Member
Location: Stockholm, Sweden Join Date: Feb 2008
Posts: 319
|
![]()
(1) You're supposed to feed DESeq integer counts. (this doesn't answer your question, I'm just saying)
(2) Your first column is not numeric, so it can't be a count, and DESeq correctly protests. What you want is probably cds <- newCountDataSet(mydata[,2:3],conds) Or, better yet, when you import your data into R, use something like mydata <- read.table(myfile, row.names=1) Then your rows will be named according to what is now in the first column, and columns 1 and 2 will be numeric. But again, you may be doing this wrong because DESeq works with counts, not fractions. |
![]() |
![]() |
![]() |
#4 |
Senior Member
Location: Stanford Join Date: Jun 2009
Posts: 181
|
![]()
DESeq is missing an appropriate error message but that's what it does when your input data are not formatted correctly. None of the variables in your input are integers, but all of them need to be.
|
![]() |
![]() |
![]() |
#5 |
Junior Member
Location: china Join Date: Sep 2010
Posts: 9
|
![]()
kopi-o,
Thank you very much! That means I should make my data integers. |
![]() |
![]() |
![]() |
#6 |
Junior Member
Location: Colorado Join Date: Jan 2013
Posts: 1
|
![]()
I have previously had success using DESeq, but have recently run into the error message:
Error in round(countData) : non-numeric argument to mathematical function What I have used looks like this: > datafile <- "DMSO_Exp3_Single_ID.txt" > ExpCountTable = read.table (datafile, header=TRUE, row.names=1) > head (ExpCountTable) DMSO1 DMSO2 DMSO3 Exp3_1 Exp3_2 Exp3_3 ID0000000001 1871 680 869 839 276 421 ID0000000002 171 4 195 140 131 215 ID0000000003 0 0 0 4 35 0 ID0000000004 4 65 126 179 52 105 ID0000000005 612 566 967 733 452 263 ID0000000006 0 0 0 1 0 0 > ExpDesign = data.frame(row.names = colnames(ExpCountTable), condition = c("DMSO1", "DMSO2", "DMSO3", "Explin24h1", "Explin24h2", "Explin24h3"), libType = c("single-end", "single-end", "single-end", "single-end", "single-end", "single-end") ) > ExpDesign condition libType DMSO1 DMSO1 single-end DMSO2 DMSO2 single-end DMSO3 DMSO3 single-end Exp3_1 Explin24h1 single-end Exp3_2 Explin24h2 single-end Exp3_3 Explin24h3 single-end > condition = factor (c("untreated", "untreated", "untreated", "treated", "treated", "treated")) > cds = newCountDataSet(ExpCountTable,condition) Error in round(countData) : non-numeric argument to mathematical function Any help would be greatly appreciated! |
![]() |
![]() |
![]() |
#7 |
Member
Location: OH, USA Join Date: Oct 2013
Posts: 18
|
![]()
I have the same issue and I've also worked previously with DESeq. I checked if my text file has any empty rows or columns, but of no use. Any suggestions would be greatly appreciated.
Thanks |
![]() |
![]() |
![]() |
#8 |
Devon Ryan
Location: Freiburg, Germany Join Date: Jul 2011
Posts: 3,480
|
![]()
Just apply() is.numeric() to the rows to determine which one or ones aren't working.
|
![]() |
![]() |
![]() |
#9 |
Member
Location: OH, USA Join Date: Oct 2013
Posts: 18
|
![]()
Hi Devon, Thanks for your quick reply. But, just wondering if the command is "is.numeric()"
|
![]() |
![]() |
![]() |
#10 |
Devon Ryan
Location: Freiburg, Germany Join Date: Jul 2011
Posts: 3,480
|
![]()
Yeah, it is. Just type "help(is.numeric)" for details. Something like
Code:
which(apply(ExpCountTable, 1, is.numeric) == F) |
![]() |
![]() |
![]() |
#11 |
Member
Location: OH, USA Join Date: Oct 2013
Posts: 18
|
![]()
Hi Devon,
> is.numeric(rownames(counts)) [1] FALSE > is.numeric(colnames(counts)) [1] FALSE Here is the output for the command. I guess, my dataframe is right as my first row and column have row names and column names. |
![]() |
![]() |
![]() |
#12 |
Devon Ryan
Location: Freiburg, Germany Join Date: Jul 2011
Posts: 3,480
|
![]()
Of course row and column names will never be numeric, that's not relevant to anything.
|
![]() |
![]() |
![]() |
#13 |
Member
Location: OH, USA Join Date: Oct 2013
Posts: 18
|
![]()
Yayy !! It worked. I was giving the wrong order of dataframe and input file in cds command line. Thanks a lot for your time Devon !!
Priya |
![]() |
![]() |
![]() |
#14 |
Junior Member
Location: Baltimore,MD Join Date: Feb 2015
Posts: 2
|
![]()
Hi I am having the same issue!
(ddsMat <- DESeqDataSetFromMatrix(countData =test4 ,colData = sampleTable,design = ~Cell )) Error in round(assay(se)) : non-numeric argument to mathematical function > dim(test4) [1] 25368 136 > dim(sampleTable) [1] 136 4 This is not a fault of rownames which I have checked. I essentially have a counts data frame from featurecounts (Rsubread) and its giving me the error seen above..... Does anyone know how I can check input counts file "test4", find if it needs reformating and how to fix it. I found this person with similar problem: http://cbtngs.blogspot.com/ Last edited by varenkardz; 03-20-2015 at 12:58 PM. |
![]() |
![]() |
![]() |
#15 |
Devon Ryan
Location: Freiburg, Germany Join Date: Jul 2011
Posts: 3,480
|
![]()
You probably have an NA somewhere or you somehow have strings in one column. A quick way to check would be to:
Code:
class(test4) table(is.na(test4)) |
![]() |
![]() |
![]() |
Thread Tools | |
|
|