colData design issues, need help in R
1
0
Entering edit mode
R_diot • 0
@50f26885
Last seen 20 months ago
Denmark

Hej, im a microbiologist working in my master and I accidently blurted out I took basic bioinformatic as a course and now wants some help with some 39k data entries (my terminology is not the greatest)

Im working on a larger dataset the count matrix looks like this

genes |A.1|A.2|A.3|A.4|B.1|B.2|B.3|B.4|C.1|C.2|C.3|C.4|D.1|D.2|D.3|D.4
AT5G   *imagine a bunch of numbers here  
AT6G
AT7G
AT8G
AT9G 


coldata <- data.frame(sample = c(rep("A", 4), rep("B", 4), rep("C", 4),rep("D", 4)),
                 timestamp = c(rep("1",1),rep("2",1),rep("3",1),rep("4",1)))

which looks like this
sample   timestamp
<chr>    <chr>
A       1           
A       2            
A       3           
A       4           
B       1
B       2           
B       3       
B       4       
C       1           
C       2
C       3           
C       4       
D       1       
D       2    
D       3   
D       4

and this is my

DESeqDataSetFromMatrix

dds_sub <- DESeqDataSetFromMatrix(countData = count_matrix, colData = coldata, design = ~ sample + timestamp)

as you can se in my resultnames(dds.sub)

resultsNames(dds_sub)
[1] "Intercept"                              "sample_dcp5_vs_Col.0"                  
[3] "sample_pat1.path1.path2.summ2_vs_Col.0" "sample_summ2_vs_Col.0"                 
[5] "timestamp_CIM_24hr_vs__NT_0min"         "timestamp_CIM_45min_vs__NT_0min"       
[7] "timestamp_CIM_6d_vs__NT_0min"  

I only get options for sample or for timestamp

what I need is sample AND timestamp specifically

sample_A.2_VS_B.2

but R keeps spitting this error after me

Error in cleanContrast(object, contrast, expanded = isExpanded, listValues = listValues, :A 2 and B 2 should be levels of sample such that sample_A.2_vs_A and sample_B.2_vs_A are contained in 'resultsNames(object)'
DESeq2 • 603 views
ADD COMMENT
1
Entering edit mode
@mikelove
Last seen 16 hours ago
United States

I'd recommend to pair up with someone who can help you formulate the design and specify how to pull out the right terms. Unfortunately I only have time to help with software related issues here. Besides avoiding errors, you also want to make sure you understand the meaning of the contrasts you are performing.

ADD COMMENT
0
Entering edit mode

I appreciate the help Michael!

ADD REPLY

Login before adding your answer.

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