Error In Deseq Analysis
3
0
Entering edit mode
13.1 years ago
Stephanhart ▴ 30

Hello,

I have RNA-seq data, which I am trying to analyze with DESeq. My file (.csv) appears to be correct

head(myfile) " geneid VZw13 VZw14a VZw14b VZw15a VZw15b VZ_w16a 1 ENSG00000253101 0 0 0 0 0 0 ..."

However, when I try

cds <- newCountDataSet(myfile,conds)

I get the following error message:

"Error in newCountDataSet(myfile, conds) : The countData is not integer."

The problem, as far as I can tell, is that mu data are numerical, not integer, because when I run

str(myfile) "'data.frame': 53507 obs. of 14 variables: $ VZ_w13 : num 0 0 0 0 8 0 0 0 0 0 ..."

Does anyone have a way to make my data integer, not numerical? As you can see, the data are in fact integers.

Thanks, Stephan

deseq • 10k views
ADD COMMENT
3
Entering edit mode
13.0 years ago
Martin Morgan ★ 1.6k

Your data would more naturally be represented as a matrix

m <- as.matrix(countsTable)

with storage.mode integer

storage.mode(m) = "integer"

The Bioconductor mailing list (no subscription required) would have been appropriate for this question.

ADD COMMENT
2
Entering edit mode
13.1 years ago
Zheng Chen ▴ 120

I think the problem is not because your data are numerical but the first column of your data table is in string format. DESeq check whether the numeric values in your data table are integer or not, however, the first column is your gene ids, which prevent DESeq from converting them to integers.

The solution will be simple change your first column into row names such that all data entries in your table will be numeric. Here is an example of reading count data from a CSV file.

countsTable <- read.table(your_file, sep=',', header=FALSE, row.names=1)
cds <- newCountDataSet(countsTable, conds)

Here the option row.names=1 will tell R to use the first column as row names.

ADD COMMENT
0
Entering edit mode

I originally thought that was the problem as well; it is not. I included the option "row.names=1" when reading the file and R/DESeq still thinks my integers are not integers.

ADD REPLY
0
Entering edit mode

May I have your code for table reading? It seems to be a problem of that part.

ADD REPLY
0
Entering edit mode
13.1 years ago

your countsTable should look like this: > str(countsTable)[?] int [1:10000, 1:5] 67 107 113 203 8 713 11 428 71 1322 ...[?] - attr(*, "dimnames")=List of 2[?] ..$ : chr [1:10000] "gene_1_F" "gene_2_F" "gene_3_F" "gene_4_F" ...[?] ..$ : chr [1:5] "A1" "A2" "B1" "B2" ...[?]

ADD COMMENT

Login before adding your answer.

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