Skip to content

feat(methylation): EPIC v2 replicate table and cross-reactive list - #17

Merged
ESCRI11 merged 1 commit into
mainfrom
feat/epicv2-reference
Sep 30, 2026
Merged

ESCRI11 merged 1 commit into
mainfrom
feat/epicv2-reference

Conversation

@ESCRI11

@ESCRI11 ESCRI11 commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

What

  • inst/extdata/epicv2-replicates.rds (new, 48 KB). Every EPIC v2 probe whose cg id is replicated: 11,616 probes over 5,222 ids. Columns are probe_id (full IlmnID), cpg (bare id), recommended (exactly one per cpg) and evidence (the Peters 2024 verdict). attr(, "manifest") = "20a1", and attr(, "source") names the inputs. playbase.epigenetics::collapse_epicv2_replicates() reads this table and refuses one whose manifest doesn't match its annotation package.
  • inst/extdata/cross-reactive-probes.rds gets a fourth source, peters2024_epicv2, with 37,034 bare ids. The three existing lists are byte-for-byte the same rows.
  • data-raw/build-epicv2-reference.R builds both files from IlluminaHumanMethylationEPICv2manifest / IlluminaHumanMethylationEPICv2anno.20a1.hg38 (Bioconductor 3.19; both install on R 4.3 / minfi 1.48) and the published Peters et al. 2024 Additional file 4, pinned by md5.

How the recommended replicate is chosen

Illumina's manifest doesn't designate a preferred replicate. Rep_Num is only a synthesis counter. The only per-probe evaluation that has been published is Peters et al. 2024 (BMC Genomics 25:251), which labels every replicated probe in Rep_results_by_NAME. The script ranks those labels, and the first match wins:

  1. superior probe / superior by WGBS
  2. best sensitivity
  3. best precision
  4. no verdict, "insufficient evidence", or a verdict saying only the probe-set mean is best
  5. inferior

Ties go first to a probe the annotation can place, then to the lowest replicate number, then to the probe id. This is DMRcate's filter.strategy = "sensitivity" (same author), made deterministic. We never average replicates. Here is how the 5,222 recommendations break down: 684 superior probe, 1,181 superior by WGBS, 2,714 best sensitivity, 271 "group mean" sets and 372 "insufficient evidence" sets, the last two decided by tie-break. The 684 + 1,181 = 1,865 undisputed sets match the paper's count.

Cross-reactive definition

The list takes Peters' CH_BLAT == "Y" (30,627 in-silico cross-hybridising probes) plus Illumina's unmapped chr0 probes, which is the paper's "37,346". Each is recorded by its bare id, and for a replicated id the flag comes from the replicate the collapse keeps. SNP-affected probes aren't added here, because the Methylome app masks those from the manifest's SNP columns for each array. Consumers should select sources by array: peters2024_epicv2 describes v2 probe sequences.

Note for pinning

The monorepo images currently ship playdata 4d53ff0, which has neither cross-reactive-probes.rds nor ewas-catalog.rds. This branch is based on main (71fd13c), which has both.

🤖 Generated with Claude Code

- inst/extdata/epicv2-replicates.rds: one row per EPIC v2 probe whose cg id
  is replicated (11,616 probes over 5,222 ids) with probe_id, cpg,
  recommended (exactly one per cpg) and evidence; attr manifest = "20a1",
  attr source naming the inputs. Illumina's manifest has no preferred
  replicate (Rep_Num is only a synthesis counter), so the choice ranks the
  Peters et al. 2024 replicate verdicts (superior, then best sensitivity,
  then best precision, then no verdict or group mean, then inferior), with
  deterministic tie-breaks. Averaging is never offered.
- inst/extdata/cross-reactive-probes.rds: adds source peters2024_epicv2,
  37,034 bare ids (Peters 2024 CH_BLAT plus unmapped chr0 probes, flagged
  by the replicate that survives the collapse). The three existing lists
  are unchanged.
- data-raw/build-epicv2-reference.R builds both from the Bioconductor
  EPIC v2 manifest/annotation packages and the published Additional file 4,
  pinned by md5.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@ESCRI11
ESCRI11 merged commit 975b875 into main Sep 30, 2026
@ESCRI11
ESCRI11 deleted the feat/epicv2-reference branch September 30, 2026 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant