Hi everyone ,
I am trying to see differential expression of genes across my samples ( control, T1, T2, T4) and I have 1 replicates for each, i.e. I have 8 samples in total. I did the transcripts count from Htseq and now while trying to compare between conditions I am so confused. I dont know how to arrange my script in results section so that I can have comparision between control and each timepoints ( control vs T1, control vs T2, control vs T4). Also I want these separate for both replicates. Till now my code 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 ("control", "t1", "t2", "t4", "control", "t1", "t2", "t4")
sampleTable<-data.frame(sampleName=sampleFiles, fileName=sampleFiles, condition=sampleCondition)
ddsHTSeq<- DESeqDataSetFromHTSeqCount(sampleTable = sampleTable,
directory = directory,
design= ~ condition)
ddsHTSeq
dds<-DESeq(ddsHTSeq)
res<-results(dds)
res<-res[order(res$padj),]
head(res)
I am new to this R stuff please help.
Thank you,
Ambika
I tried to compare t1 vs control like:
res<-results(dds, contrast= c("condition","t1", "control"))
res<-res[order(res$padj),]
and this gave me a table with 6 columns. One thing I am confused is I have 2 replicates so, does it combines the control and T1 of both replicates and gives the output? Do I have to specify to do the comparirions separately for two replicates? How does this works can you please clarify?
Many thanks,
AMbika
Yes, the replicates are used, and the results inform whether the differences across condition could be just by chance alone, where that is determined using all the replicates. Please look over the DESeq2 paper, which presents the methods and how they work. You don't need to understand all the details, but you should at least read the motivating sections, so you know what the software you are using is doing, and why.