We recently commissioned some RNASeq work and I am getting my first taste of using bioconductor. This is probably a bit of a silly question for all you experts, but I just cannot seem to figure it out: Our experiment involved two cell lines that were each treated with four compounds. Each treatment was done in triplicate and there are untreated controls in triplicate as well. We are interested in comparing differential expression between the treatments vs. control in each cell line as well as comparing the same treatment between the two cell lines.
My coldata table looks something like this:
cell compound rep c1c1_1 c1 c1 1 c1c1_2 c1 c1 2 c1c1_3 c1 c1 3 c1c2_1 c1 c2 1 ... c2c3_3 c2 c3 3 c2c4_1 c2 c4 1 c2c4_2 c2 c4 2 c2c4_3 c2 c4 3 c2cc_1 c2 cc 1 c2cc_2 c2 cc 2 c2cc_3 c2 cc 3
Now to my questions:
- Does it make sense to work with both cell lines in the same DESeqDataSet object?
- If yes, would '~cell + cell:compound' be a reasonable design?
- When comparing results between cell lines, I assume I need to compare fold-changes. Are there methods in bioconductor that can compare two DESeqResults objects?
Any feedback, pointers, or advice greatly appreciated!
Can you provide the code you are using, for example the
DESeq()
call, and the output ofresultsNames(dds)
.Here is what I did:
I edited the second
results()
call above, to directly compare c1 over control. I had previously given the command which would be appropriate if one of these arguments had been used: test="LRT", betaPrior=FALSE or modelMatrixType="standard", in which case the base level of compound (control) would have been absorbed into the intercept. But for the standard DESeq() run, we need to explicitly contrast compound 1 against control, so this is reflected in the new code.What you are getting back with this command is the log fold change between the compound 1 vs control effect in the two cell lines. It's log2( (compound 1 vs control in cell 2) / (compound 1 vs control in cell 1) ). The rearrangement of terms above works because the multiplications and divisions become addition and subtraction on the log scale.
"With the second command, I seem to get genes that are behaving differently in each cell line but in different ways. Some have higher counts for the compound of interest in one cell line compared with the other, others have about the same counts but they markedly differ from the other treatments and the control."
Exactly, it's the difference between compound 1 and control which is being examined. This means that the normalized counts for compound 1 in cell 1 and cell 2 might be similar, but if the control's normalized counts are different, then the ratio of ratios will not be close to 1 (and the log fold change will not be close to 0).
Great! Thank you very much. This makes much more sense now. I did not know you could give two vectors to contrast.