Construct a tibble of all pairwise contrasts between levels of a categorical variable in the sample table of a qsea::qseaSet.
makeAllContrasts(qseaSet, variable)A tibble with two columns:
group1 – the first level of the pair,
group2 – the second level of the pair.
Each row represents one unordered pair of distinct levels (i.e., all
combinations without repetition).
Levels are inferred from unique(qsea::getSampleTable(qseaSet)[[variable]]).
Pairs are formed between all distinct levels; no self-contrasts are included.
Other DMR-detection:
calculateDMRs(),
fitQseaGLM(),
getDMRsData()
data(exampleTumourNormal, package = "mesa")
# All pairwise contrasts among levels of 'type'
exampleTumourNormal %>%
makeAllContrasts("type")
#> # A tibble: 10 × 2
#> group1 group2
#> <chr> <chr>
#> 1 CRC LUAD
#> 2 CRC LUSC
#> 3 CRC NormalColon
#> 4 CRC NormalLung
#> 5 LUAD LUSC
#> 6 LUAD NormalColon
#> 7 LUAD NormalLung
#> 8 LUSC NormalColon
#> 9 LUSC NormalLung
#> 10 NormalColon NormalLung