I need help with some clarifications please
I have control versus treatment in two time points like
> y X condition time 1 CTRL_24_hrs_replicate1 control 24 2 CTRL_24_hrs_replicate2 control 24 3 CTRL_24_hrs_replicate3 control 24 4 treatment_24_hrs_replicate1 t 24 5 treatment_24_hrs_replicate2 t 24 6 treatment_24_hrs_replicate3 t 24 7 CTRL_48_hrs_replicate1 control 48 8 CTRL_48_hrs_replicate2 control 48 9 CTRL_48_hrs_replicate3 control 48 10 treatment_48_hrs_replicate1 t 48 11 treatment_48_hrs_replicate2 t 48 12 treatment_48_hrs_replicate3 t 48 >
I want to see the difference of treatment versus control from 24 hours to 48 hours, so this is not just the difference of treatment versus control or difference between 24 versus 48 hours rather the treatment versus control from 24 hours to 48 hours
This is what I have done so far
> dds <- DESeqDataSetFromMatrix(countData=count, + colData=design, + design=~condition, tidy = FALSE) Warning message: In DESeqDataSet(se, design = design, ignoreRank) : some variables in design formula are characters, converting to factors > dds$group <- factor(paste0(dds$time, dds$condition)) > design(dds) <- ~ group > dds <- DESeq(dds) estimating size factors estimating dispersions gene-wise dispersion estimates mean-dispersion relationship final dispersion estimates fitting model and testing > resultsNames(dds) "Intercept" "group_24IT_vs_24control" "group_48control_vs_24control" "group_48IT_vs_24control" >
How to find the difference at time point 24 vs 48 in condition ?
I searched and I found a similar thing but I don't know how to adopt that to my data
results(dds, contrast=list(c("time_4_vs_0", "conditionLD.time4")), test="Wald")
I tried this and I got error
> results(dds, contrast=list(c("time_48_vs_24", "conditionIT.time24")), test="Wald") Error in checkContrast(contrast, resNames) : all elements of the contrast as a list of length 2 should be elements of 'resultsNames(object)' >
Can you help me in adopting this to my data please?