Entering edit mode
norty89
•
0
@norty89-12294
Last seen 7.2 years ago
Hi! I hope you can help me to solve this issue.
I'm using DESeq to look for differentially expressed genes betweem male and female specimes, comparing my samples (trated) with the control (untreated). If I understood correctly the procedure, it should be done like this:
cds <- DESeqDataSetFromMatrix(dataset, sample_metadata, ~ Treatment + Sex + Treatment:Sex)
But this gives me the results for all the samples that I put in the analysis. Since I have 500 samples, I'm looking for a way to get a list (or at least the number) of DE genes for each one of my sample. Is there a way to do this?
Thanks!
Could you clarify what you mean by 'each one of my sample' - do the treated and untreated come in pairs, and you're looking for differential genes in each pair (in which case it's unclear how you're going to get 'differentially expressed genes betweem male and female' to be a meaningful comparison). Or do you want to look at each 'treated' in turn (which you've unfortunately used as a synonym for 'sample' in your introductory text) and somehow want to conjure a male vs female comparison for that.
Perhaps head(sample_metadata, n=10) might allow us to narrow down the meaning of your question, as currently it's hard to see how more than one male:female genelist could be generated (other than per treatment-type), let alone one per sample
Your quoted code is a correct way to detect genes that are having a different response to treatment depending on whether the subject is male or female, but may lead to complications as to how to interpret the main effects (ie a pure treatment effect, or a pure sex effect) when the interaction effect is significant.