Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

DNA methylation preprocessing

This mini-protocol converts Illumina methylation-array IDAT files into an analysis-ready probe-by-sample phenotype matrix for mQTL analysis.

Miniprotocol Timing

Timing: TBD

Overview

Choose either SeSAMe or minfi to preprocess paired red/green IDAT intensities. Both workflows produce beta-value and M-value matrices, convert probe coordinates to BED phenotype files, and annotate probes with nearby genes. M values are generally used as the quantitative phenotype for association testing, whereas beta values remain useful for interpretation.

After calling, phenotype imputation removes probes above the missingness threshold and imputes the remaining missing values. Steps 1 and 2 are alternative starting routes; run only one, then run step 3 on its M-value BED output.

Steps

Analysis goalCommands to run, in orderInputs
Process IDAT files with SeSAMe1 → 3tests/fixtures/methylation_calling/protocol_example.methylation.sample_sheet_int.csv; paired input/methylation/*/*_Grn.idat and *_Red.idat files
Process IDAT files with minfi2 → 3input/methylation_minfi/protocol_example.methylation.sample_sheet.csv; paired input/methylation_minfi/*/*_Grn.idat and *_Red.idat files

Run the commands for the selected route in numerical order.

1. Call methylation levels with SeSAMe

What it does: sesame performs probe- and sample-level detection filtering, calculates beta and M values, and formats both matrices as coordinate-sorted BED files.

2. Call methylation levels with minfi

What it does: minfi applies detection-p-value filtering and functional normalization, then writes beta and M values in the same downstream-compatible BED format.

3. Filter and impute the M-value matrix

What it does: bed_filter_na removes probes exceeding the missingness threshold and uses soft-impute for the remaining missing entries.

Output

Route/stepOutput filename and relative pathDescription
SeSAMeoutput/methylation/protocol_example.methylation.sample_sheet_int.sesame.rdsSerialized SeSAMe result object
SeSAMetests/fixtures/methylation_calling/expected/protocol_example.methylation.sample_sheet_int.sample_qcs.sesame.tsvPer-sample quality-control summary
SeSAMeoutput/methylation/protocol_example.methylation.sample_sheet_int.sesame.beta.tsv; output/methylation/protocol_example.methylation.sample_sheet_int.sesame.M.tsvProbe-by-sample beta- and M-value tables
SeSAMetests/fixtures/methylation_calling/expected/protocol_example.methylation.sample_sheet_int.sesame.beta.bed.gz; tests/fixtures/methylation_calling/expected/protocol_example.methylation.sample_sheet_int.sesame.M.bed.gzIndexed BED phenotype matrices
SeSAMetests/fixtures/methylation_calling/expected/protocol_example.methylation.sample_sheet_int.sesame.gene_id.annot.tsvProbe-to-gene annotation
minfioutput/methylation_minfi/protocol_example.methylation.sample_sheet.minfi.rdsSerialized minfi result object
minfioutput/methylation_minfi/protocol_example.methylation.sample_sheet.minfi.beta.tsv; output/methylation_minfi/protocol_example.methylation.sample_sheet.minfi.M.tsvProbe-by-sample beta- and M-value tables
minfioutput/methylation_minfi/protocol_example.methylation.sample_sheet.minfi.beta.bed.gz; output/methylation_minfi/protocol_example.methylation.sample_sheet.minfi.M.bed.gzIndexed BED phenotype matrices
minfioutput/methylation_minfi/protocol_example.methylation.sample_sheet.minfi.gene_id.annot.tsvProbe-to-gene annotation
Step 3output/methylation/protocol_example.methylation.sample_sheet_int.sesame.M.filter_na.soft.bed.gzFiltered and imputed M-value phenotype matrix

For the minfi route, give step 3 the minfi M-value BED path instead; the output keeps the minfi filename prefix.

Anticipated Results

The selected calling route produces beta- and M-value matrices with probes in rows and samples in columns, together with sample QC and probe annotation files. After step 3, the M-value BED contains only retained probes and has no missing phenotype values, making it suitable for covariate preprocessing and methylation-QTL association testing.

Command Interface