Here is a subset of my df. How can I run pairwise comparisons of median expression between disease status for each clus_ft and use Bonferroni correction?
For example, from this df subset, I would want to perform the following comparisons:
- A_CD1, no disease vs. A_CD1, with disease
- B_CD1, no disease vs. B_CD1, with disease
- A_IFN, no disease vs. A_IFN, with disease
I do not want to compute pvalues for all possible pairwise comparisons. For example, the following comparison is irrelevant and should not be computed:
A_CD1
, no disease vs. A_IFN
, with disease
| patient_id | median | disease | clus_ft |
| ---------- | ------ | ------- | ------- |
| 1 | 0.40 | no | A_CD1 |
| 2 | 0.29 | no | A_CD1 |
| 1 | 0.43 | yes | A_CD1 |
| 2 | 0.32 | yes | A_CD1 |
| 1 | 0.77 | no | B_CD1 |
| 2 | 0.65 | no | B_CD1 |
| 1 | 0.01 | yes | B_CD1 |
| 2 | 0.06 | yes | B_CD1 |
| 1 | 0.86 | no | A_IFN |
| 2 | 0.85 | no | A_IFN |
| 1 | 0.02 | yes | A_IFN |
| 2 | 0.24 | yes | A_IFN |
Showing 1 to 12 of 960 entries