Convenience wrapper around getDataTable() to extract raw counts.
Returns a window × sample (or group) table for downstream summaries/plots.
getCountTable(
qseaSet,
useGroupMeans = FALSE,
addMethodSuffix = FALSE,
verbose = TRUE
)qseaSet.
A qseaSet object containing methylation-enriched sequencing data.
Default: none (must be supplied).
logical(1).
If TRUE, average replicates by the group column in the sample table and
return group means; if FALSE, return per-sample counts.
Default: FALSE.
logical(1).
If TRUE, keep the method suffix in column names (e.g., Sample1_counts
or Group_counts_means); if FALSE, return bare sample/group names.
Default: FALSE.
logical(1).
Print progress/messages.
Default: TRUE.
A tibble/data.frame with one row per genomic window and columns for each
sample (or group), plus any window metadata included by getDataTable().
data(exampleTumourNormal, package = "mesa")
# Per-sample counts (first rows/columns)
exampleTumourNormal %>%
getCountTable() %>%
dplyr::select(1:6) %>%
head()
#> Generating table of counts values for 819 regions across 10 samples.
#> # A tibble: 6 × 6
#> seqnames start end CpG_density Colon1_N Colon1_T
#> <fct> <int> <int> <dbl> <dbl> <dbl>
#> 1 7 25002001 25002300 5.51 0 1
#> 2 7 25005001 25005300 13.4 1 0
#> 3 7 25008601 25008900 5.57 0 0
#> 4 7 25011301 25011600 5.10 0 1
#> 5 7 25017601 25017900 8.38 0 0
#> 6 7 25017901 25018200 17.9 0 4
# Group means instead of individual samples
exampleTumourNormal %>%
getCountTable(useGroupMeans = TRUE) %>%
dplyr::select(1:6) %>%
head()
#> Generating table of counts values for 819 regions across 10 sample groups.
#> # A tibble: 6 × 6
#> seqnames start end CpG_density Colon1_N Colon1_T
#> <fct> <int> <int> <dbl> <dbl> <dbl>
#> 1 7 25002001 25002300 5.51 0 1
#> 2 7 25005001 25005300 13.4 1 0
#> 3 7 25008601 25008900 5.57 0 0
#> 4 7 25011301 25011600 5.10 0 1
#> 5 7 25017601 25017900 8.38 0 0
#> 6 7 25017901 25018200 17.9 0 4
# Keep the method suffix in column names
exampleTumourNormal %>%
getCountTable(addMethodSuffix = TRUE) %>%
names() %>%
head()
#> Generating table of counts values for 819 regions across 10 samples.
#> [1] "seqnames" "start" "end" "CpG_density"
#> [5] "Colon1_N_counts" "Colon1_T_counts"