Convenience wrapper around getDataTable() to extract NRPM values
(normalised reads per million). Returns a window × sample (or group) table
for downstream summaries/plots.
getNRPMTable(
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 NRPM.
Default: FALSE.
logical(1).
If TRUE, keep the method suffix in column names (e.g., Sample1_nrpm
or Group_nrpm_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 NRPM (first rows/columns)
exampleTumourNormal %>%
getNRPMTable() %>%
dplyr::select(1:6) %>%
head()
#> Generating table of nrpm 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 0.131
#> 2 7 25005001 25005300 13.4 0.263 0
#> 3 7 25008601 25008900 5.57 0 0
#> 4 7 25011301 25011600 5.10 0 0.131
#> 5 7 25017601 25017900 8.38 0 0
#> 6 7 25017901 25018200 17.9 0 0.523
# Group means instead of individual samples
exampleTumourNormal %>%
getNRPMTable(useGroupMeans = TRUE) %>%
dplyr::select(1:6) %>%
head()
#> Generating table of nrpm 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 0.131
#> 2 7 25005001 25005300 13.4 0.263 0
#> 3 7 25008601 25008900 5.57 0 0
#> 4 7 25011301 25011600 5.10 0 0.131
#> 5 7 25017601 25017900 8.38 0 0
#> 6 7 25017901 25018200 17.9 0 0.523
# Keep the method suffix in column names
exampleTumourNormal %>%
getNRPMTable(addMethodSuffix = TRUE) %>%
names() %>%
head()
#> Generating table of nrpm values for 819 regions across 10 samples.
#> [1] "seqnames" "start" "end" "CpG_density"
#> [5] "Colon1_N_nrpm" "Colon1_T_nrpm"