
Find DMPs from methylation array beta values using limma
Source:R/find_dmps_array.R
findDMPsArray.RdThis helper identifies differentially methylated positions (DMPs) from
methylation array beta values using limma, returning the same seed-style
output columns as findDMPsBSSeq().
In contrast to dmpFinder() from minfi, this function supports flexible covariate inclusion
and returns a consistent output format with the BS-seq DMPs for downstream compatibility with CMEnt's region-finding functions.
Usage
findDMPsArray(
beta,
samplesheet,
samplesheet_sep = "\t",
sample_group_col = "Sample_Group",
id_col = "Sample_ID",
array = c("450K", "27K", "EPIC", "EPICv2", "Mouse"),
genome = c("hg19", "hg38", "hs1", "mm10", "mm39"),
sorted_locs = NULL,
njobs = getOption("CMEnt.njobs", 1L),
chr = "auto",
case_group = NULL,
covariates = NULL,
output_file = NULL
)Arguments
- beta
A beta input supported by
getBetaHandler(), such as a numeric matrix/data frame or a beta file path. minfiMethylSet/RatioSetinputs are also accepted and converted to beta values.- samplesheet
A data frame or file path to a tab-delimited sample sheet.
- samplesheet_sep
Separator for samplesheet files. Default is tab.
- sample_group_col
Column in
samplesheetcontaining group labels.- id_col
Column in
samplesheetcontaining sample IDs. row.names can also be used by specifyingid_col = "row.names".- array
Array platform passed to
getSortedGenomicLocs()whensorted_locsis not supplied.- genome
Genome passed to
getSortedGenomicLocs()whensorted_locsis not supplied.- sorted_locs
Optional data frame of probe locations with row names as site IDs and
chrplusstartorposcolumns.- njobs
Number of jobs used by
getBetaHandler()when reading beta files.- chr
Chromosomes to retain,
"auto"for chr1-chr22, or"all"for chr1-chr22 plus chrX and chrY.- case_group
Group label to treat as case. If
NULL, the first group insample_group_colis used.- covariates
Optional covariate column names, or a comma-separated string, to include in the limma model.
- output_file
Optional tab-delimited output path. Files ending in
.gzare gzipped.