I am trying to see differential expression of a fungal genome with and without treatment of a chemical gossypol. I have one sample for control and 3 treated samples at 3 different timepoints. And I have 2 replications. So, alltogether I have 8 samples (4-R1 and 4-R2). I am going to see differetial expression of genes from the HTseq count data in DESeq2 and my script looks like this:
directory <- "C:\\Users\\hp\\Desktop\\RNA.seq.data" sampleFiles <- c('count.1','count.2','count.3','count.4','count.5','count.6','count.7','count.8') sampleCondition <- c('R1control','R1time1','R1time2','R1time4','R2control','R2time1','R2time2','R2time4') sampleTable<-data.frame(sampleName=sampleFiles, fileName=sampleFiles, condition=sampleCondition) ddsHTSeq<- DESeqDataSetFromHTSeqCount(sampleTable = sampleTable, directory = directory, design= ~ condition) ddsHTSeq colData(ddsHTSeq)$condition<-factor(colData(ddsHTSeq)$condition, levels=c('count')) dds<-DESeq(ddsHTSeq) res<-results(dds) res<-res[order(res$padj),] head(res)
I am am confused on how to assign levels in colData step. When I do colData(ddHTSeq) , it gives me a DataFrame with 8 rows and 1 column condition
condition factor count.1 NA count.2 NA count.3 NA count.4 NA count.5 NA count.6 NA count.7 NA count.8 NA
Error in designAndArgChecker(object, betaPrior) : variables in the design formula cannot have NA values.