Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Q: [DEG analysis contrast] #1022

Open
bioinfolabmu opened this issue Dec 9, 2023 · 1 comment
Open

Q: [DEG analysis contrast] #1022

bioinfolabmu opened this issue Dec 9, 2023 · 1 comment
Labels
question Further information is requested

Comments

@bioinfolabmu
Copy link

Question
From your document, it seems that you can only use one factor to do the contrast in differential gene expression analysis.
What if we need to combine two factors?

What have I tried

In my "samples.tsv", I have two different developmental stages. Each stage has three different treatments. Each treatment has 3 biological samples.

I know that I can do:

contrasts:

  • stages_4_5
  • treatments_Control_Treatment1

How about contrasts: (stages 4 treatement 1) vs (stages 5 treatment 1) or different combination of both factors?

stages | treatments

4 | Control
4 | Control
4 | Control
4 | Treatment1
4 | Treatment1
4 | Treatment1
4 | Treatment2
4 | Treatment2
4 | Treatment2
4 | Treatment3
4 | Treatment3
4 | Treatment3
5 | Control
5 | Control
5 | Control
5 | Treatment1
5 | Treatment1
5 | Treatment1
5 | Treatment2
5 | Treatment2
5 | Treatment2
5 | Treatment3
5 | Treatment3
5 | Treatment3

Thank you for your attention

@bioinfolabmu bioinfolabmu added the question Further information is requested label Dec 9, 2023
@siebrenf
Copy link
Member

You can add additional columns to the samples.tsv. Here is your example:

samples stages treatments st
s1 4 treatment1 s4t1
s2 4 treatment1 s4t1
s3 5 treatment1 s5t1
s4 5 treatment1 s5t1
s5 6 treatment1 s6t1
s6 6 treatment1 s6t1

In the config.yaml, the contrast would now be: st_s5t1_s4t1 or st_s4t1_s5t1.

Note: every sample that has a label in the contrast column will be used by DESeq2 to calculate the dispersion in your data. So it is generally best to include them all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants