gMet is an R package for coverage-aware global and repeat-family DNA
methylation metrics from Illumina 450K, EPIC v1 and EPIC v2 arrays.
The package implements the algorithms developed and frozen in the accMetLoss project. It is research software and is not validated for diagnosis, prognosis or treatment selection.
- Complete literature-defined
Alu_global(595 probes),LINE1_global(9,817 probes) andLINE1_NatComm12metrics. - Locked DMLA47 scoring, requiring at least 43 of 47 probes; chronological age is mandatory before a value can be labelled DMLA47.
- Observed ALU, LINE1 and locked
WGM = 11/28 * ALU + 17/28 * LINE1. - Genuine end-to-end REMP reconstruction for
fullbetaALU,fullbetaLINE1andfullWGM, including dependency diagnostics, parcel caching and official prediction-quality filtering; reconstructed values are never labelled observed. - Frozen BroadFamily, YoungFunctional, AncientComparator and CrossPlatformCommonCore ALU/LINE1 manifests for 450K, EPIC v1 and EPIC v2.
- Mean, median and 10-percent trimmed-mean aggregation with cohort- and sample-level coverage gates.
- Healthy-reference fitting and expected-minus-observed methylation-loss acceleration.
- An experimental fit/project interface for frozen Eigen-Transposon PC1 models. It is not a promoted primary metric.
The discontinued 450K historical measurable-subset metrics are intentionally absent from the package.
install.packages(
"https://github.com/hyu020/gMet/releases/download/v0.10.0/gMet_0.10.0.tar.gz",
repos = NULL,
type = "source"
)
library(gMet)After the repository is public, development versions can also be installed
with remotes::install_github("hyu020/gMet").
library(gMet)
# beta: probes in rows, samples in columns, values in [0, 1]
gm_methods()
result <- gm_score(
beta,
methods = c("dmla47", "alu_global", "line1_global",
"cross_platform_common_core_alu"),
platform = "450K"
)
as.data.frame(result)
gm_qc(result)
gm_report(result)gm_score(methods = "all") evaluates every direct method and preserves
ineligible methods as explicit INELIGIBLE_METHOD records instead of silently
relaxing a probe definition.
probes <- dmla47_probes()
beta47 <- matrix(
runif(length(probes) * 20, 0.4, 0.9),
nrow = length(probes),
dimnames = list(probes, paste0("sample", seq_len(20)))
)
age <- seq(25, 75, length.out = 20)
raw <- score_methylation_loss(beta47)
dmla47 <- compute_dmla(raw$raw_score47, age, slope = "fixed")Without age, raw_score47 remains a raw methylation score and is never called
DMLA47. DMLA47 is a within-cohort standardized quantity and its cohort means
must not be compared as an absolute cross-cohort scale.
scores6 <- assemble_six_metric_scores(
observed_alu,
observed_line1,
remp_alu,
remp_line1,
sample_id
)
reference <- gm_fit_reference(
score = scores6$ALU,
age = healthy_age,
cohort = healthy_cohort,
reference_cohort = "reference",
metric = "ALU",
tissue = "whole blood"
)
dmla <- gm_dmla(tumour_alu, tumour_age, reference)Positive DMLA means more methylation loss than expected for chronological age. Reference transport should be tissue matched and its cohort provenance retained.
Install the Bioconductor engine once, then run both repeat families through one interface. The first run creates and persistently caches the complete Alu and LINE-1 parcels; later runs reuse them.
gm_install_remp()
gm_remp_status()
remp_result <- gm_remp_end_to_end(
beta,
platform = "auto", # 450K or EPIC v1
genome = "hg19",
ncore = 4,
seed = 777
)
remp_result$six_metrics
remp_result$reconstructed
remp_result$families$ALU$product
remp_result$families$LINE1$productPrimary fullBeta summaries are calculated after the official
REMP::rempTrim() quality filter. Raw products and summaries remain available
under each family result. gm_remp_prepare() can build the cache in advance,
while gm_remp() remains available for a single family. EPIC v2 is rejected
because upstream REMP does not natively support it. gm_score() remains the
direct-observation scorer and therefore does not silently reconstruct data.
- ALU and LINE1 remain separate primary families.
- YoungFunctional-LINE1 may be a limited panel on 450K and is not promoted when fewer than 30 cohort-measurable loci remain.
- CrossPlatformCommonCore supports robustness analyses but does not establish absolute calibration across platforms.
- REMP outputs are reconstructed estimates.
- Eigen-Transposon loadings must be fitted in an outcome-free healthy resource, frozen, and only projected into new cohorts.
- Probe manifests and thresholds are versioned scientific assets.
Rscript tests/testthat.R
R CMD build .
R CMD check gMet_0.10.0.tar.gz --as-cranBug reports and contributions are welcome at https://github.com/hyu020/gMet/issues.
MIT. See LICENSE.md.