Question: How to include geneIDs in colData and countData format in DESeq2?
0
gravatar for jpcchoy
8 months ago by
jpcchoy0
jpcchoy0 wrote:

Hi everyone,

I'm trying to analyse a bunch of ribo-seq samples using DESeq2.

I know that ncol(countData) == nrow(colData) should evaluate TRUE.

But I don't know how to input GeneIDs in this case.

Currently, my colData looks as follows:

> coldata
     Sample  Treatment
[1,] "cts46" "Untr"    
[2,] "cts47" "Ifn"        
[3,] "cts48" "Vir"       
[4,] "cts49" "Ifn-Vir"  
[5,] "cts50" "Ltm-Untr"  
[6,] "cts51" "Ltm-Ifn"   
[7,] "cts52" "Ltm-Vir"   
[8,] "cts53" "Ltm-Ifn-Vir"

... and my countData as follows:

> head(countdata)
                 key cts46 cts47 cts48 cts49 cts50 cts51 cts52 cts53 
1  ENST00000000233.9     4     0     1     1     4     3     2     4 
2  ENST00000000412.7     0     0     0     0     0     1     0     0 
3 ENST00000000442.10     0     0     0     0     0     0     0     0 
4  ENST00000001008.5     1     1     2     2    67    72    31    43 
5  ENST00000001146.6     0     0     0     0     0     0     0     0 
6  ENST00000002125.8     0     0     0     0     0     0     0     0

...etc.

If ncol(countdata) is equal to the number of samples, then where will the geneIDs go? I would have thought ncol(countdata) == nrow(coldata) + 1. Sorry if I've missed something in the documentation. I've found it a little difficult to understand at times. Thanks for any help working this out.

rna-seq deseq2 • 237 views
ADD COMMENTlink modified 8 months ago by swbarnes27.6k • written 8 months ago by jpcchoy0
3
gravatar for swbarnes2
8 months ago by
swbarnes27.6k
United States
swbarnes27.6k wrote:

You should make your leftmost columns of both datasets into rownames, instead of having row numbers

ADD COMMENTlink written 8 months ago by swbarnes27.6k

Thanks so much! This worked :)

ADD REPLYlink written 8 months ago by jpcchoy0
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.3.0
Traffic: 1522 users visited in the last hour