Dseq single factor and 4 levels experiment design
1
0
Entering edit mode
AP • 0
@ap-14194
Last seen 22 months ago
United States

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

rnaseq deseq2 • 869 views
ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 26 minutes ago
United States

The first place to look is the help page for the function in question. You want to build multiple results tables, so check ?results, specifically the ‘contrast’ argument.

ADD COMMENT
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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.

ADD REPLY

Login before adding your answer.

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