I am currently working in plant pathogen interaction and is trying to make a gene co-expression network using RNA-seq data. I used HTseq-count to get the read counts.
My dataset consist of Resis_treated (1st day, 3rd day and 7th day) samples taken under 3 time point with 2 replicated for each time point. I have a factor with 3 levels
Day1 Day1 Day3 Day3 Day7 Day7
I am trying to get the DEGs between Day3VsDay1, Day7VsDay1 and Day7Vs_Day3. The code I used is as follows
sampleTable<-data.frame(sampleName=sampleFiles, fileName=sampleFiles, condition=sampleCondition)
ddsHTSeq<-DESeqDataSetFromHTSeqCount(sampleTable=sampleTable, directory=directory, design=~condition)
ddsHTSeq <- ddsHTSeq[ rowSums(counts(ddsHTSeq)) > 1, ] ddsHTSeq dds <- DESeq(ddsHTSeq) resultsNames(dds)  "Intercept" "conditionDay3vsDay1" "conditionDay7vsDay1"
After running the code, to get all of the pairwise comparisons I used lfcShrink() with the contrast= option 3 times.
I tried to contrast day7VsDay3 data. But it showed an error as follows
day73 <- lfcShrink(dds, contrast=c("condition", "day7", "day3")) Error in cleanContrast(object, contrast, expanded = isExpanded, listValues = listValues, : day7 and day3 should be levels of condition such that condition_day7_vs_Day1 and condition_day3_vs_Day1 are contained in 'resultsNames(object)'
Kindly help me to resolve the error.
Is there any error in defining levels in sampleCondition andcoldata line**
how do I get all pairwise combinations of all levels espiecially Day7vsDay3 along with the other two combinations