How does the DESeq2 work?

This is not DESeq2 specific but rather deals with modeling in general when comparing two groups. Whether you’re using DESeq2 or a t-test or some other linear model, you have to specify exactly what it is that you’re trying to model.

If you assign some patients to a “treatment” group and other patients to a “control” group, you’re basically looking at the difference between the two groups without caring about the individual patients within in each group. This is called an unpaired design.

If you assign some patients to a “treatment” group and other patients to a “control” group AND also specify who the patients are (e.g. patient 1 control, patient 1 treatment, patient 2 control, patient 2 treatment, patient 3 control, patient 3 treatment), this is called a “paired” design (look up how the paired t-test works). Basically, you’re comparing patient 1 treatment to patient 1 control, patient 2 treatment to patient 2 control, and patient 3 treatment to patient 3 control.

Regardless, you don’t get a p-value for each patient separately because you’re testing the null hypothesis of whether the treatment group is the same as the control group; you only get one p-value (that is, one p-value for each gene). If your question is “does the treatment have a statistically significant effect?”, it doesn’t make sense to get a p-value for each individual patient.

Read more here: Source link