DeSeq2 Question - Reading Sample Table to DESeqDataSet
1
0
Entering edit mode
Marc • 0
@marc-16072
Last seen 6.5 years ago

I am trying to read in a Sample Table into DeSeq2, where the first column is all my gene names and the row names are my individual samples and their corresponding counts. Can anyone tell me the best way to build the DESeqDataSet?

deseq2 • 868 views
ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 15 hours ago
United States

Take a look at ?DESeqDataSetFromMatrix.

This function takes as input a matrix of counts, where the gene names can be rownames of the matrix (or you can add them to the metadata columns afterward, using e.g. mcols(dds)$genenames <- ...).

ADD COMMENT
0
Entering edit mode

I have done that, however, when I run the DESeqDataSetfromMatrix with my counts as part of matrix (row=gene names, columns=samples) and colData as metadata. I get back an Error - some values in assay are not integers. The count numbers are XX.XXX (example format). Suggestions?

ADD REPLY
0
Entering edit mode

Try using round() first. I should say, if these are estimated counts from e.g. RSEM, this makes sense.

If these are normalized counts, it's best to provide DESeq2 with the original scale counts. We perform normalization internally using offsets, and so only raw counts or estimated counts should be used as input.

If you are working with e.g. RSEM or another such quantifier, consider using tximport to take care of all of this for you, removing the chance for bugs and error.

ADD REPLY
0
Entering edit mode

> ddsFullCountTable <- DESeqDataSetFromMatrix(countData = sampleTable3, colData = colData2, design = ~ Treatment)
Error in if (assays_nrow != rowData_nrow) { : argument is of length zero

I have never seen this error before, colData columns match sampleTable rows. The only column in colData is Treatment specifically 2 different ones. (A and B)

 

Suggestions?

ADD REPLY
0
Entering edit mode

What are the dimensions of the two objects?

ADD REPLY
0
Entering edit mode

> dim(colData2)
[1] 6 1
> dim(sampleTable3)
[1] 205342      6

ADD REPLY
0
Entering edit mode

What are the classes of these two objects?

ADD REPLY

Login before adding your answer.

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