Search
Question: DeSeq2 Question - Reading Sample Table to DESeqDataSet
0
gravatar for Marc
9 days ago by
Marc0
Marc0 wrote:

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?

ADD COMMENTlink modified 7 days ago by Michael Love18k • written 9 days ago by Marc0
0
gravatar for Michael Love
7 days ago by
Michael Love18k
United States
Michael Love18k wrote:

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 COMMENTlink written 7 days ago by Michael Love18k

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 REPLYlink written 7 days ago by Marc0

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 REPLYlink modified 7 days ago • written 7 days ago by Michael Love18k

> 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 REPLYlink modified 7 days ago • written 7 days ago by Marc0

What are the dimensions of the two objects?

ADD REPLYlink written 7 days ago by Michael Love18k

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

ADD REPLYlink written 7 days ago by Marc0

What are the classes of these two objects?

ADD REPLYlink written 5 days ago by Michael Love18k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 393 users visited in the last hour