Search
Question: DeSeq2 Question - Reading Sample Table to DESeqDataSet
0
gravatar for Marc
4 months 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 4 months ago by Michael Love19k • written 4 months ago by Marc0
0
gravatar for Michael Love
4 months ago by
Michael Love19k
United States
Michael Love19k 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 4 months ago by Michael Love19k

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 4 months 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 4 months ago • written 4 months ago by Michael Love19k

> 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 4 months ago • written 4 months ago by Marc0

What are the dimensions of the two objects?

ADD REPLYlink written 4 months ago by Michael Love19k

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

ADD REPLYlink written 4 months ago by Marc0

What are the classes of these two objects?

ADD REPLYlink written 4 months ago by Michael Love19k
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: 429 users visited in the last hour