Melody: Decoding the Sequence Determinants of Locus-Specific DNA Methylation Across Human Tissues

preprint OA: closed
📄 Open PDF Full text JSON View at publisher

Abstract

DNA methylation is a fundamental epigenetic modification that plays crucial roles in transcriptional regulation, cellular differentiation, and genome stability. However, how locus-specific DNA methylation is determined by intrinsic DNA sequence remains poorly understood. Here, we introduce Melody, a deep learning framework that predicts DNA methylation from 10-kb genomic sequences, enabling the integration of both local and long-range sequence signals. Across 39 human tissues, Melody accurately predicts methylation profiles and consistently outperforms existing state-of-the-art methods in whole-chromosome, hypomethylated-region, and cell-type-specific benchmarks. Melody also generalizes to methylation quantitative trait locus (meQTL) effect prediction and identifies regulatory sequence motifs associated with methylation variability. To extend prediction beyond profiled tissues, we further develop Melody-G, which incorporates single-cell RNA-seq foundation model embeddings to infer methylation states in previously unseen cell types directly from transcriptomic data. Together, Melody provides a unified framework for linking genomic sequence and cellular state to DNA methylation and offers new insights into the regulatory logic governing the human methylome.
Full text 68,401 characters · extracted from preprint-html · click to expand
Melody: Decoding the Sequence Determinants of Locus-Specific DNA Methylation Across Human Tissues | bioRxiv /* */ /* */ <!-- <!-- /*! * yepnope1.5.4 * (c) WTFPL, GPLv2 */ (function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,h){var i=b(a),j=i.autoCallback;i.url.split(".").pop().split("?").shift(),i.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]),i.instead?i.instead(a,e,f,g,h):(y[i.url]?i.noexec=!0:y[i.url]=1,f.load(i.url,i.forceCSS||!i.forceJS&&"css"==i.url.split(".").pop().split("?").shift()?"c":c,i.noexec,i.attrs,i.timeout),(d(e)||d(j))&&f.load(function(){k(),e&&e(i.origUrl,h,g),j&&j(i.origUrl,h,g),y[i.url]=2})))}function h(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var i,j,l=this.yepnope.loader;if(e(a))g(a,0,l,0);else if(w(a))for(i=0;i (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0];var j=d.createElement(s);var dl=l!='dataLayer'?'&l='+l:'';j.src='//www.googletagmanager.com/gtm.js?id='+i+dl;j.type='text/javascript';j.async=true;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-M677548'); Skip to main content Home About Submit ALERTS / RSS Search for this keyword Advanced Search New Results Melody: Decoding the Sequence Determinants of Locus-Specific DNA Methylation Across Human Tissues Junru Jin , Ding Wang , Jianbo Qiao , Wenjia Gao , Yuhang Liu , Siqi Chen , View ORCID Profile Quan Zou , Shu Wu , Ran Su , Leyi Wei doi: https://doi.org/10.1101/2025.11.23.689975 Junru Jin 1 School of Software, Shandong University , Jinan, China Find this author on Google Scholar Find this author on PubMed Search for this author on this site Ding Wang 2 New Laboratory of Pattern Recognition (NLPR), State Key Laboratory of Multimodal Artificial Intelligence Systems (MAIS), Institute of Automation, Chinese Academy of Sciences 3 School of Artificial Intelligence, University of Chinese Academy of Sciences Find this author on Google Scholar Find this author on PubMed Search for this author on this site Jianbo Qiao 1 School of Software, Shandong University , Jinan, China Find this author on Google Scholar Find this author on PubMed Search for this author on this site Wenjia Gao 1 School of Software, Shandong University , Jinan, China Find this author on Google Scholar Find this author on PubMed Search for this author on this site Yuhang Liu 4 Faculty of Applied Science, Macao Polytechnic University , Macao, 999078, China Find this author on Google Scholar Find this author on PubMed Search for this author on this site Siqi Chen 1 School of Software, Shandong University , Jinan, China Find this author on Google Scholar Find this author on PubMed Search for this author on this site Quan Zou 5 Institute of Fundamental and Frontier Sciences, University of Electronic Science and Technology of China , Chengdu, 610054, China Find this author on Google Scholar Find this author on PubMed Search for this author on this site ORCID record for Quan Zou Shu Wu 2 New Laboratory of Pattern Recognition (NLPR), State Key Laboratory of Multimodal Artificial Intelligence Systems (MAIS), Institute of Automation, Chinese Academy of Sciences 3 School of Artificial Intelligence, University of Chinese Academy of Sciences Find this author on Google Scholar Find this author on PubMed Search for this author on this site For correspondence: shu.wu{at}nlpr.ia.ac.cn ran.su{at}tju.edu.cn weileyi{at}sdu.edu.cn Ran Su 6 College of Intelligence and Computing, Tianjin University , Tianjin, 300350, China Find this author on Google Scholar Find this author on PubMed Search for this author on this site For correspondence: shu.wu{at}nlpr.ia.ac.cn ran.su{at}tju.edu.cn weileyi{at}sdu.edu.cn Leyi Wei 4 Faculty of Applied Science, Macao Polytechnic University , Macao, 999078, China 7 Joint SDU-NTU Centre for Artificial Intelligence Research (C-FAIR), Shandong University , Jinan, China Find this author on Google Scholar Find this author on PubMed Search for this author on this site For correspondence: shu.wu{at}nlpr.ia.ac.cn ran.su{at}tju.edu.cn weileyi{at}sdu.edu.cn Abstract Full Text Info/History Metrics Supplementary material Preview PDF Abstract DNA methylation is a fundamental epigenetic modification that plays crucial roles in transcriptional regulation, cellular differentiation, and genome stability. However, how locus-specific DNA methylation is determined by intrinsic DNA sequence features remains poorly understood. Here, we introduce Melody, a deep learning framework designed to elucidate the sequence determinants underlying human DNA methylation landscapes across multiple tissues. Trained solely on genomic sequence, Melody accurately predicts cell-type-specific methylation profiles across 39 human tissues, markedly outperforming existing state-of-the-art approaches at the whole-chromosome, hypomethylated, and cell-type-specific levels. Moreover, Melody demonstrates strong generalization in meQTLs variant effect prediction, and Melody reveals key sequence motifs associated with methylation variability. Finally, to extend prediction to unseen cell types, we develop a sequence-based model augmented with scRNA-seq–derived embeddings, enabling accurate inference of cell-type-specific methylation states directly from transcriptomic data. Together, Melody provides a powerful framework for decoding the genomic and transcriptional logic that governs DNA methylation specificity in the human epigenome. Introduction DNA methylation is a fundamental epigenetic modification that regulates gene expression, maintains genome stability, and contributes to tissue-specific cellular identity 1 , 2 . It plays critical roles in diverse biological processes such as embryonic development, cell differentiation, and aging. Aberrant DNA methylation patterns have been implicated in a wide range of diseases, including cancers, neurological disorders, and metabolic syndromes 3 – 5 . DNA methylation profiles have also been shown to reflect biological age and exposure history, making them a powerful resource for both basic research and clinical applications 6 . In addition, methylation Quantitative Trait Loci (meQTLs) 7 —genetic variants that influence DNA methylation levels—serve as important molecular markers for understanding disease mechanisms and for early diagnosis and risk stratification, and meQTLs are increasingly studied in relation to gene expression 8 . With the growing availability of large-scale sequencing data, deep learning has emerged as a transformative approach for decoding the non-linear regulatory relationships encoded in the genome 9 , 10 . Models such as AlphaGenome 11 , Enformer 12 , have demonstrated remarkable capacity in capturing distal regulatory dependencies from raw DNA sequence. However, despite these advances, most current frameworks, including AlphaGenome, do not explicitly model DNA methylation or its cell-type specificity. Several earlier studies have proposed specialized models for methylation prediction, such as DeepCpG 13 , CPGenie 14 , iDNA-ABT 15 , iDNA-ABF 16 and INTERACT 17 , which use sequence and, in some cases, local genomic context to predict methylation states. DeepCpG and CPGenie represent early convolutional architectures that rely on shallow two-layer CNNs to extract local sequence features associated with methylation. In contrast, iDNA-ABT and iDNA-ABF introduce transformer-based and pretrained architectures to capture broader contextual dependencies, while INTERACT integrates convolutional and transformer layers within a unified framework. While these pioneering efforts established the feasibility of deep learning for methylation analysis, their limitations have become increasingly apparent in light of recent methodological and data advances. First, existing datasets and model architectures are outdated. Many previous models were trained on limited or early-generation datasets and relied on short sequence windows (e.g., 41 bp), which fail to capture long-range dependencies that are now known to influence methylation. Moreover, all previous models were designed for a single or few cell lines, overlooking the extensive cell-type-specific heterogeneity of methylation across tissues. Second, meQTLs prediction, a key question in functional genomics, remains poorly benchmarked. No standardized benchmark dataset exists to fairly evaluate model performance on meQTLs effect prediction, leaving the field without a clear assessment of core DNA methylation motif capture. Third, most existing models exhibit poor generalizability: they can predict methylation accurately only on training datasets but fail to extend to new tissues or developmental stages. This lack of generalization severely limits their clinical and translational applicability, even though DNA methylation profiling is increasingly used in cancer diagnostics, disease screening, and biological age estimation. To address these challenges, we developed Melody (Methylation Learning On DNA), a new deep learning framework for decoding DNA methylation from sequence and transcriptomic information. Melody is designed to overcome limitations in both modeling and data coverage. To improve prediction in cell-type-specific regions, we implement two complementary architectures, a multi-track and a single-track predictor, together with multi-task learning and weighted loss functions that enhance robustness across tissues. We further construct a comprehensive meQTLs benchmark datasets to systematically evaluate variant effect prediction, providing the first fair and unified comparison among models. In addition, we perform a detailed analysis of cell-type-specific motifs, characterizing them in terms of both specificity and regulatory strength to uncover sequence determinants of methylation variation. Finally, to generalize DNA methylation prediction to unseen tissues or developmental stages, we integrate scRNA-seq based embeddings into the sequence model, enabling accurate inference of cell-type-specific methylation patterns solely from transcriptomic profiles. This integrative model substantially improves performance on differentially methylated regions (DMRs) and facilitates practical application to new biological contexts. To support broad accessibility, we also developed a user-friendly Melody web server ( https://inner.wei-group.net/Melody/ ) that allows interactive prediction, visualization, and exploration of methylation landscapes across tissues. Results Melody variants enable DNA methylation prediction across diverse contexts The overall architecture of Melody is presented in Figure 1 . We curated DNA methylation maps covering 39 distinct normal human cell types 18 ( Fig. 1A ). To predict high-resolution epigenetic profiles directly from raw DNA sequences, we developed Melody ( Fig. 1B ) as a deep fully convolutional neural network based on a specialized U-Net-style encoder-decoder architecture. The model features a deep hierarchical structure composed of inverted residual blocks, which facilitates the efficient extraction of nonlinear features while ensuring training stability through residual learning. A critical design element of Melody is its aggressively downsampled encoder that rapidly expands the receptive field to incorporate long-range genomic dependencies, including distal regulatory elements, into the predictive context. To restore precise spatial resolution, the symmetric decoder utilizes additive skip connections to fuse these global semantic representations with the local structural details preserved by the encoder. Furthermore, Melody integrates a multi-task learning framework with parallel output heads that simultaneously generate fine-grained single-nucleotide predictions and coarse-grained estimates of CpG counts and average methylation levels per 100 bp region. The latter two losses serve as auxiliary tasks to bolster the Melody capacity to capture complex DNA methylation landscapes. Download figure Open in new tab Figure 1. Overall framework and workflow of the Melody framework. Melody encompasses three variants, namely Melody-ST, Melody-MT, and Melody-G, which are optimized for distinct task scenarios. (A) Collection of methylation atlas from 39 cell types utilized for training and evaluation. (B) Prediction of human methylation patterns from 10 kb input DNA sequences. Melody processes 10 kb sequences, in contrast to the local base-level recognition of CpGenie 14 , to integrate long-range genomic context via a 1D U-Net architecture. A multi-task prediction head subsequently performs joint learning for single-base resolution methylation levels, average methylation levels per 100 bp, and CpG counts per 100 bp. (C) Schematic representation of the three Melody variants. (D) Melody-G is designed for methylation level prediction in unseen cell types. It utilizes DNA sequences alongside scRNA-seq data encoded by a single-cell foundation model (FM). By fusing these multimodal inputs via feature-wise linear modulation and employing a two-stage training strategy, the model achieves cell-type-specific methylation profiling for previously unobserved cell types. Melody encompasses three variants, namely Melody-ST, Melody-MT, and Melody-G ( Fig. 1C ). Melody-ST and Melody-MT are tailored for single-track and multi-track methylation profiling respectively. Here, Melody-ST and Melody-MT are developed to maximize performance in cell type-specific accessible regions as multi-track may diminish cell-type-specific accuracy 19 . Melody-G incorporates cell-type-specific scRNA-seq data to enable methylation level prediction in unseen cell types guided by cellular identity ( Fig. 1D ), which is a variant that integrates cell-type-specific scRNA-seq embeddings derived from pre-trained single-cell foundation models (FM). The model employs a feature-wise linear modulation strategy to fuse these cellular features with DNA sequence representations, effectively conditioning the network to identify methylation states across diverse cellular contexts. We designed a cross-cell-type generalization experiment wherein the model was trained on a set of observed cell types and evaluated on a completely disjoint set of unobserved cell types. Melody-G undergoes a two-phase training regimen. In Phase 1 (G1), the model is trained on whole chromosomes from seen cell types. Subsequently, Phase 2 (G2) focuses on fine-tuning using cell-specific regions from seen cell types to facilitate generalization to specific regions in unseen cell types. Melody outperforms existing methods in methylation prediction We benchmarked Melody against leading DNA methylation prediction methods, including INTERACT, CpGenie and iDNA-ABT, under three complementary evaluation regimes: chromosome-split validation, hypomethylated sample-split validation and cell-type-specific regions. Here, we focused on two Melody variants, Melody-ST and Melody-MT, designed to capture and interpret regulatory determinants of DNA methylation. Across 39 datasets, Melody-MT achieved mean AUCs of 0.914 on the sampling test set and 0.862 on the test chromosome, outperforming the second best model, INTERACT (0.861 and 0.784 on the corresponding sets) ( Fig. 2A,B ). Melody-ST likewise improved upon all baselines across metrics, and together the two variants yielded an average ~10.2% relative gain in AUC over competing methods. Download figure Open in new tab Figure 2. Comparison of model performance with state-of-the-art methods. One point in the figure represents one dataset. (A–B) Performance comparison across multiple dataset splits, including chromosome- and hypomethylated sample-based validation, test sets, and cell-type-specific regions. (C) Chromosome level Pearson correlation and MSE comparison across models. (D–E) ROC and precision–recall curves comparison across models. (F) Methylation states level MSE comparison across models. (G) Model performance comparison on sample valid and test dataset for seven representative cells. (H) Performance comparison across different sequence lengths. (I) Evaluation of loss-weight hyperparameters. The first item in each pair represents the weight of the CpG site, and the second represents the weight of the hypomethylated CpG site. Other non CpG sites are set to 1.(J) CpG sites counting loss and average methylation level loss weighting comparison. The sequence-only model iDNA-ABT, which uses a 41-bp input window, performed substantially worse, indicating that such short sequence contexts are insufficient to capture the broader regulatory information required for accurate methylation prediction. As anticipated, Melody-ST was particularly effective in cell-type-specific regions, surpassing Melody-MT and suggesting an enhanced ability to model localized regulatory effects. Both Melody variants achieved the highest area under the ROC curve (AUC) 0.934 value and average precision (AP) 0.982 value among all methods ( Fig. 2D,E ). Here, we also present a performance comparison on the validation and test datasets for seven representative cell types, and the results show that Melody consistently outperforms all competing methods. ( Fig. 2G ). To assess robustness, we further evaluated Melody across individual chromosomes and methylation states ( Fig. 2C,F ). On both validation and test chromosomes, Melody attained up to a 12.0% relative improvement in AUC compared with the best competing model, indicating that its advantages generalize across genomic contexts. When stratified by methylation state, Melody maintained strong Pearson correlations and low mean squared error (MSE) at all methylation levels, demonstrating stable performance. Notably, whereas most baselines deteriorated in hypomethylated regions, Melody remained robust, suggesting that it effectively captures subtle sequence features associated with low methylation levels—regions that are typically difficult to model and biologically complex. From a model design perspective, we systematically evaluated how performance varies with sequence length, loss-weight configurations, and CpG site count weighting. As shown in Fig. 2E , the optimal sequence window is around 10 kb, providing sufficient context without excessive parameter overhead; shorter windows (e.g., 2 kb) underperform due to limited contextual information, whereas longer inputs (20–50 kb) introduce redundant sequence regions. Regarding loss weighting, the parameter pair (8, 32)—applied to high-methylation CpG and low-methylation CpG positions, respectively—achieved the best trade-off ( Fig. 2I ). This setting is consistent with the biological expectation that CpG sites are typically methylated and that the learning objective should prioritize the more challenging low CpG methylation events, with low-methylation CpG positions receiving the highest emphasis. Finally, since our training objective includes both regional average methylation and CpG site count prediction losses, we explored their relative weights and found that assigning higher weight to the regional average methylation loss leads to improved overall performance, while the CpG-count loss serves as a useful auxiliary signal. Together, these results demonstrate that Melody effectively captures both local and long-range dependencies, producing accurate, robust, and generalizable DNA methylation predictions across diverse genomic contexts and experimental conditions. Melody effectively prioritizes genetic variants influencing DNA methylation Accurately predicting the impact of genetic variants on DNA methylation is essential for understanding the regulatory mechanisms that connect sequence variation to epigenetic changes. To evaluate this capability, we assessed Melody performance on fine-mapped methylation quantitative trait loci (meQTLs). Because no standardized deep-learning benchmark exists for meQTL prediction, we curated three independent resources, Ólafur et al. 8 , GTEx 7 , and EPIGEN 20 to construct a more comprehensive and diverse evaluation panel. We first examined individual meQTL examples using attribution maps 21 ( Fig. 3A,B ). In Fig. 3A , an A→G substitution creates a strong IRF binding motif, which Melody correctly identifies as causing a local decrease in methylation. In Fig. 3B , a C→T variant disrupts a CTCF motif, and Melody accurately predicts the resulting increase in methylation. These examples highlight Melody’s ability to infer the direction of methylation change by recognizing allele-specific motif gains and losses. Then for quantitative assessment, we used Pearson correlation between predicted and observed variant effects. Many tissues contain multiple methylation tracks (e.g., GTEx blood may correspond to B cells, T cells, or mixed leukocyte populations), so we first evaluated whether averaging across all related tracks yields more robust prediction than selecting a single track. As shown in Fig. 3C , using the average across related tracks (Supplementary Table 2) consistently improves performance for both Melody-MT and Melody-ST, indicating that track averaging reduces noise and improves robustness. Given that Melody-ST performs better than Melody-MT on cell-type-specific methylation prediction ( Fig. 2A–B ), we next asked whether this advantage translates to better motif-driven variant effect prediction. Surprisingly, across all meQTLs datasets ( Fig. 3D ), Melody-MT outperforms Melody-ST, suggesting that multi-track architecture provides stronger motif capture ability, whereas ST stronger performance in cell-type-specific methylation regions may be partly overfitting rather than true motif generalization. Download figure Open in new tab Figure 3. Melody accurately predicts meQTLs effects and recognizes meaningful sequence motifs. (A,B) In silico saturation mutagenesis with Melody-MT for representative meQTLs samples. Predicted methylation profiles are shown before and after the causal SNP for variants that either increase or decrease methylation levels. The blue-shaded region denotes a cell-type–specific low-methylation zone, and the red dashed line marks the SNP position. (C) Performance of Melody-MT on meQTLs datasets when using different cell-type–specific prediction tracks. For each dataset, we have two options: either a single representative cell-type channel or the average prediction across several biologically related channels. (D) Comparison of Melody-MT and Melody-ST on meQTL prediction. (E) Comparison of Melody-MT with other models on all datasets and cross different variant-methylation block distances. (F,G) Scatter plots of Melody-predicted versus observed methylation difference scores (MDSs) for meQTLs in the GTEx_WholeBlood dataset. (H) Cross–cell-type evaluation of meQTL prediction on GTEX data. (I) Relationship between training progress and meQTL prediction performance. Average and median meQTL performance across datasets are shown as a function of training steps. We then compared Melody to other SOTA models across a range of variants–CpG distances ( Fig. 3E ). Melody shows superior performance at all distance scales, demonstrating its strong ability to capture meaningful sequence motifs driving methylation variation. In blood datasets such as MDSs and GTEx Blood, Melody achieves Pearson correlations of 0.62 and 0.42, respectively ( Fig. 3FG ). By contrast, models using extremely short input windows like iDNA-ABT (41 bp) fail to capture meaningful long-range relationships and show near-random performance. All models show decreased performance as variant–CpG distance increases, indicating that long-range regulatory meQTLs are more difficult to explain purely from sequence features—a known limitation given that many distal methylation QTLs involve chromatin contacts and higher-order genomic architecture. To assess whether Melody’s tissue tracks are biologically meaningful, we conducted cross-track validation ( Fig. 3H ). Related tracks typically achieve the best or second-best performance (e.g., blood, colon), indicating that Melody successfully captures cell-type-specific regulatory motifs relevant to each meQTL dataset. Ovary data perform poorly, likely due to either (i) lower data quality in ovary methylation tracks or (ii) ovary-specific motifs being underrepresented in available meQTL datasets. Finally, we evaluated how training progression affects meQTL prediction ( Fig. 3I ). Both mean and median correlation steadily improve with training steps and converge smoothly, demonstrating that meQTL prediction is stable throughout training. Models with stronger methylation prediction performance consistently show better meQTL effect prediction, further supporting the link between methylation modeling accuracy and motif capture ability. Together, these results demonstrate that Melody is highly effective at identifying functional variants that modulate DNA methylation, capturing allele-specific sequence logic with high accuracy across tissues, datasets, and genomic distances. Melody reveals motif variability and regulatory differences across tissues To dissect how sequence-resolved perturbations influence DNA methylation across regulatory contexts, we performed a motif-centered allelic perturbation analysis using Melody ( Fig. 4A ). To comprehensively evaluate motif effects, we curated 282 transcription factor motifs from a motif database 22 . For each motif, we randomly sampled one representative instance from the database. To ensure meaningful perturbation signals, we sampled genomic methylation blocks containing at least four CpG sites from the training dataset. Motifs were then inserted into regions spanning 600 bp upstream of the block start and 600 bp downstream of the block end. The difference between the predicted methylation level of the motif-inserted sequence and the original unmodified sequence was defined as the motif effect at that position. We used Melody-MT as the primary predictor for this analysis because it demonstrated the strongest performance in our meQTLs benchmark. Download figure Open in new tab Figure 4. Melody maps motif-driven methylation variation across tissues. (A) Overview of the motif-centered allelic perturbation workflow comparing methylation predictions between reference and motif-inserted sequences. (B) Scatterplot showing motif strength and tissue specificity across 282 transcription factor motifs. (C) Violin plot displaying the distribution of motif-induced methylation effects across consolidated chromatin states. (D) Positional effect profiles for representative motifs (ZNF85, HD/10, SPI1, IRF2, CTCF) across six tissues. (E) Heatmap showing methylation effects across motifs and tissues. By predicting methylation landscapes for both reference and variant sequences, Melody isolates the contribution of individual motifs and quantifies their allele-specific positional effects with high resolution. Several example motifs are shown in Fig. 4D . Across six representative tissues selected from our 39-tissue panel, motifs exhibited distinct effect profiles: ZNF85 produced a positive local methylation shift, whereas HD/10, SPI, IRF2, and CTCF produced negative shifts. Notably, tissue-specific differences are also apparent—HD/10 exhibits stronger effects in liver and pancreas, while SPI and IRF2 show their strongest signals in blood-derived cell types. The CTCF motif displays a particularly characteristic non-smooth, oscillatory pattern reminiscent of nucleosome phasing, consistent with reported CTCF–nucleosome interactions. Melody predicts a pronounced local loss of methylation proximal to the CTCF motif, aligning with CTCF’s known function as a methylation-sensitive insulator that protects CpGs from DNMT activity and promotes demethylation via TET recruitment 23 . To better quantify motif differences, we defined two metrics: strength, measuring how strongly a motif perturbs methylation (computed as the maximal absolute effect in the positional curve), and specificity, measuring cell-type variation (computed as the variance of effects across tissues). As shown in Fig. 4B , motifs such as HD/10 and NR/1 exhibit both high strength and high tissue specificity, highlighting their potential roles as lineage-restricted regulators of methylation landscapes. Previous studies suggest that methylation responsiveness varies substantially across chromatin states, particularly in promoter and enhancer regions, our motif-level analysis revealed more nuanced trends. When motif effects were aggregated by consolidated chromatin states (Promoter, Enhancer, Transcribed, Repressed, Heterochromatin; Fig. 4C ), promoter regions indeed showed the greatest magnitude of variation. However, enhancer regions were less distinct than often assumed, and repressed regions displayed unexpectedly strong and coherent effects that were markedly different from enhancers—suggesting fundamentally different regulatory mechanisms. Despite these differences, motif-driven methylation responses remained broadly stable across chromatin states, indicating that sequence-intrinsic biochemical interactions between transcription factor motifs and the methylation machinery dominate over chromatin context. Finally, to evaluate how well Melody captures cell-type-specific regulatory logic, we generated a motif-by-cell-type heatmap ( Fig. 4E ). This analysis revealed clear cross-tissue perturbation modules: global architectural regulators such as CTCF and REST formed broad, pan-tissue clusters, whereas blood-derived cell types clustered strongly and were dominated by hematopoietic lineage factors SPI and IRF2. These patterns recapitulate known transcriptional hierarchies and demonstrate that Melody effectively captures both global and lineage-specific regulators of DNA methylation. Collectively, these results show that Melody provides an interpretable, sequence-resolved framework for prioritizing genetic variants that modulate DNA methylation across diverse chromatin and cellular contexts. Melody can generalize to unseen tissues and accurately captures differentially methylated regions Different from Melody-MT and Melody-ST, to evaluate Melody-G’s generalization performance, we designated five cell types (Aorta-Endothel, Blood-Granulocytes, etc.) as an unseen test set, training the model on the remaining 34 cell types. As a baseline, we used the average methylation profile of the 34 seen types (MT-mean). On the unseen set, Melody-G was highly effective ( Fig. 5A ). Its two training stages, G1 and G2, achieved mean AUCs of 0.663 and 0.697, respectively. These values represent improvements of 4.7% and 10.1% over the MT-mean baseline (AUC = 0.633). This result confirms that integrating scRNA-seq embeddings provides strong guidance for predicting cell-type-specific methylation patterns. Conversely, when evaluated on the seen cell types, both G1 and G2 showed a slight performance degradation relative to single-cell-type models, though they remained superior to INTERACT ( Fig. 5B ). This is an expected trade-off: whereas models like Melody-ST and Melody-MT are specialized for a single cell type, Melody-G performs a more complex multi-task objective of concurrently inferring cell identity and predicting methylation. This powerful generalization capability necessarily entails a modest performance cost on the training data. Download figure Open in new tab Figure 5. Performance analysis of Melody-G driven by scRNA-seq embeddings. (A) Performance comparison of Melody-G’s two training stages (G1, G2) versus the mean-based MT model (MT-mean). Scatter points represent the performance distribution across five unseen cell lines. (B) Performance comparison across different methods on the seen cell types, including chromosome- and sample-based validation, test sets. (C) Predicted methylation profiles from Melody-G (blue) and the mean-normalized MT model (red) are compared with the ground truth profile (gray). The profiles span a cell-type-specific region (highlighted by blue shading) and its 2000 bp flanking regions. (D) Functional annotation of genes ranked by influence score. Genes (y-axis) are sorted by the absolute value of their directional influence score, with the magnitude indicated by bar length (x-axis). Bars are color-coded according to their membership in the top four significantly enriched KEGG pathways. Genes not associated with these pathways are shown in gray (‘Others’). (E) Kernel density estimate (KDE) of directional influence scores for highly variable genes (HVGs). The influence score (x-axis) is defined as the change in the model-predicted mean CpG methylation upon in silico gene knockout (mean-knockout – mean-baseline). The y-axis represents the probability density. Vertical dashed lines indicate the distribution’s mean (purple), median (green), and a zero-effect threshold (yellow). (F) Performance comparison of different scRNA-seq embedding fusion strategies. (G) The effect of different scRNA-seq sample sizes on model performance. (H) The effect of embeddings generated by different scRNA-seq foundation models on model performance. To visualize performance in unseen cell-type-specific regions, we examined the predicted methylation profile for a representative locus in Aorta-Endothel ( Fig. 5C ). Melody-G2 accurately captured the characteristic hypomethylation pattern within the cell-type-specific region, demonstrating its specialized learning. However, its accuracy was diminished in the flanking non-specific regions. This suggests that while G2’s fine-tuning enhances specificity, it comes at the cost of global predictive accuracy. In contrast, Melody-G1 demonstrated robust and balanced performance across both specific and non-specific regions, making it the more suitable model for generating complete and reliable methylation profiles in unseen cell types. To interpret the gene-level drivers of our model’s predictions, we performed in silico gene knockouts using Pancreas-Delta scRNA-seq data to quantify each gene’s influence. Subsequent KEGG analysis of the most influential genes revealed enrichment in distinct biological pathways ( Fig. 5D ) 24 , 25 . For example, MMP3 and HLA-DRB5, two key regulators in the rheumatoid arthritis pathway, were identified as high-impact genes; HLA-DRB5 is involved in upstream immune activation, while MMP3 mediates downstream tissue degradation 26 – 28 . This finding suggests that the scRNA-seq embeddings capture the functional state of critical pathways, providing a mechanistic basis for the model’s predictive efficacy. We next investigated how these knockouts affected the predicted methylation levels ( Fig. 5E ). Among the 1,200 most impactful genes, knockout increased predicted methylation level, implying these genes normally exert an inhibitory effect on DNA methylation. This gene-level inhibitory action provides a mechanistic explanation for the hypomethylated signatures accurately predicted by Melody-G2 ( Fig. 5C ) and demonstrates the model’s ability to learn biologically relevant regulatory principles. To dissect the contributions of our scRNA-seq embedding strategy, we conducted a series of ablation studies ( Fig. 5F-H ). First, we compared different methods for integrating the embeddings and found a feature-wise linear modulation to be the most effective. It achieved an AUC of 0.663, outperforming both a simple linear embedding and a parameter generation approach by 4.7% and 2.8%, respectively ( Fig. 5F ). We also confirmed that comprehensive cellular data is critical, as using randomly sampled subsets of cells led to a marked decrease in performance ( Fig. 5G ). Finally, we evaluated the performance of three different scRNA-seq foundation models. Notably, scGPT yielded the best results ( Fig. 5H ). We attribute this superior performance to a fundamental alignment between its pretraining objective, which captures intricate gene-gene interactions, and the biological requirements for methylation prediction. In contrast, models like scFoundation and cellFM are primarily optimized to learn universal representations for broad cell type classification, a task less directly related to local epigenetic regulation. Methods Dataset Training and evaluation datasets were derived from the DNA methylation atlas of normal human cell types 18 . To construct a representative and diverse training set, we selected 39 distinct normal human cell types from this atlas (Supplementary Table 1), prioritizing samples with clear lineage and functional representation. All data underwent standard quality control procedures to ensure the consistency of methylation measurements. Model The core architecture of Melody is based on a 1D U-Net topology 29 , which has proven effective for modeling biological sequence data with hierarchical spatial structure in prior work such as AlphaGenome and Enformer. The U-Net model consists of a symmetric encoder–decoder with successive downsampling and upsampling blocks connected by skip connections, allowing the network to integrate long-range context while preserving base-pair–resolution local information. Here, to better adapt the U-Net architecture to the DNA methylation prediction task, we modify several architectural components, including the normalization layers and convolutional kernels. The model takes base-pair–resolution nucleotide sequences as input and uses a sigmoid output layer to produce base-pair–resolution DNA methylation probabilities. To enhance the model’s ability to capture complex DNA methylation patterns, we introduced several key methodological innovations: Auxiliary Loss Functions To ensure the model learned relevant genomic features at multiple scales, we incorporated two auxiliary loss terms alongside the primary prediction task. The first, termed average loss (Lavg), compels the model to predict the mean methylation level within each 100 bp segment. This loss is as a supplement for region methylation capture. The second, CG loss (LCG), tasks the model with predicting the total count of CpG dinucleotides (i.e., CpG density) within the same segment. This loss works as a CpG island capture. This multi-task learning strategy was found to significantly stabilize training and improve overall model performance. Weighted Loss Mechanism Recognizing the functional heterogeneity of different CpG sites, we implemented a weighted loss function. This function is governed by two hyperparameters, α and β, which selectively increase the loss contribution of all CpG sites (α) and, more specifically, low-methylation CpG sites (β). By focusing the model’s attention on these sites, which are often enriched in active regulatory elements (e.g., promoters and enhancers), this weighting scheme demonstrably improved predictive accuracy and enhanced the model’s sensitivity in downstream eQTL analyses. We developed three configurations of the Melody framework to address distinct prediction scenarios: Melody-ST (single-track), Melody-MT (multi-track) and Melody-G (generalize). All three share the same sequence-to-methylation backbone described above, but differ in how they use cell-type information. Melody-ST and Melody-MT operate on cell types with directly measured methylation tracks, specializing either in a single cell type or in joint multi-cell-type modeling. Melody-G extends this design by additionally conditioning on cell embeddings derived from scRNA-seq data, enabling methylation prediction in unseen cell types. Model Configuration and Training Melody was trained on random genomic windows sampled from the GRCh38 primary assembly using a custom sampler built on the Selene framework. At each training step, we drew a 10-kb window (10,000 bp) from a random genomic position and retrieved the one-hot–encoded nucleotide sequence together with the corresponding base-resolution methylation tracks for all available cell types from BigWig files. The primary prediction loss was defined at base resolution and computed over all valid positions in each batch. All models were trained with a batch size of 32 using the Adam optimizer on a single NVIDIA A100 GPU (40 GB); a typical training run completed in approximately 72 hours. Melody-ST Melody-ST is a single-track configuration tailored for cell-type-specific methylation prediction. For a given experiment, the model is trained on one cell type at a time, using a single bigWig track as supervision, and produces a base-resolution methylation probability for each genomic position. Architecturally, Melody-ST uses the 1D U-Net backbone with a single output channel (track = 1) in the final 1×1 convolution layer, while retaining the auxiliary heads that predict CpG counts and regional methylation levels at 100 bp resolution. This setup encourages the model to capture both local motif-level effects and broader regional methylation states for that specific cell type. During training, the same weighted loss scheme is applied, increasing the contribution of CpG and low-methylation positions so that Melody-ST focuses on the most functionally informative sites. Melody-MT Melody-MT is a multi-track configuration designed to jointly model DNA methylation across multiple cell types. In this setting, the model is trained with 39 methylation tracks from the atlas, and the final 1×1 convolution layer outputs track = 39 channels, each corresponding to one cell type. All cell types share the same encoder–decoder parameters, while their methylation profiles are disentangled in the channel dimension of the output. The auxiliary 100 bp heads, predicting CpG density and average methylation, are defined over the same shared feature maps and output one value per segment for each track, providing additional supervision on both CpG architecture and regional methylation patterns. This multi-task training encourages the backbone to learn regulatory features that are partially shared across tissues while still allowing track-specific specialization. In practice, Melody-MT serves as the default model for tasks that involve multiple tissues, including meQTLs effect prediction and cross–cell-type transfer, and also provides the mean-track baseline (MT-mean) used to evaluate Melody-G on unseen cell types. Melody-G To enable the prediction of DNA methylation in unseen cell types, our model integrates DNA sequences with cell-type-specific features derived from scRNA-seq data. This approach provides the necessary cellular context for the model to generalize and make cell-type-specific predictions, even for cell types not encountered during training. The scRNA-seq Data Collection and Preprocessing Single-cell RNA-seq datasets for 39 cell types were obtained from the National Center for Biotechnology Information (NCBI). All relevant accession numbers are listed in Supplementary Table 3. Raw scRNA-seq gene expression counts were processed using the Scanpy (v1.11.1) 30 package. The preprocessing workflow involved two main quality control steps: first, we filtered the dataset to a predefined panel of 19,264 target genes by adopting the strategy of Hao et al 31 . Second, we removed cells expressing fewer than 200 genes. The resulting quality-controlled gene-cell count matrix served as the input for all downstream analyses. Generation of cell embeddings We utilized three scRNA-seq foundation models to generate cell embeddings from gene expression data: scGPT 31 , 32 , scFoundation 31 , and CellFM 33 . For scGPT, we generated cell embeddings using the pre-trained scGPT model, following the methodology of Cui et al. First, we selected the top 1,200 highly variable genes (HVGs) and discretized their log-normalized expression values into 51 bins. We then converted each cell’s profile into a sequence of tokens. A special classification token was prepended to each sequence to enable the model to learn a global cell representation. After processing these sequences with the scGPT model, we extracted the output embedding corresponding to the token for each cell. Finally, these raw embeddings were L2-normalized to produce the final cell representations used in all downstream analyses. For scFoundation, we generated cell embeddings using the pre-trained scFoundation model, following the methodology of Hao et al 31 ., from a quality-controlled expression matrix of 19,264 genes. For each cell, the model first constructs an input representation for each gene by summing two distinct components. The first component is a gene name embedding retrieved from a learnable lookup table, while the second is an expression value embedding derived from its continuous, non-discretized value. A Transformer architecture then processes the full sequence of these combined gene representations to produce a single, global embedding for each cell. These final embeddings served as the input for all downstream analyses. For CellFM, we generated cell embeddings using the pre-trained CellFM model, following the methodology of Zeng et al 33 . A key preprocessing step involved standardizing each cell’s profile to a fixed-length sequence of 2,048 genes. This was achieved by selecting the 2,048 most highly expressed genes for cells exceeding this limit and by padding with zero-value tokens for cells below it. The model then constructs an input representation for each gene by summing two components: a value embedding derived from its continuous expression value via a multi-layer perceptron, and a gene identity embedding retrieved from a learnable lookup table. The resulting sequence of combined embeddings was then processed by the model’s core architecture to generate the final cell embeddings. Data preparation for training For each cell type, we generated a representative embedding by averaging the individual embedding vectors from all of its constituent cells. To assess the impact of data scale on performance, we then evaluated two alternative sampling strategies. The first setting used an embedding from a single, randomly selected cell. The second used the average of embeddings from a randomly sampled 10% of the cell population. Two-stage training strategy We designed a two-stage training protocol for Melody-G to evaluate its cross-cell-type generalization. First, we partitioned the 39 available cell types into a training set of 34 “seen” types and a held-out test set of five “unseen” types (Aorta-Endothel, Blood-Granulocytes, Blood-Monocytes, Cortex-Neuron, and Pancreas-Delta). The first training stage (G1) aimed to learn general genomic patterns from the seen cell types, using chr10 for validation, chr8 and chr9 for testing, and the remaining chromosomes for training. The second stage (G2) then focused on fine-tuning for cell-type specificity by training exclusively on cell-type-specific regions from the seen types and evaluating performance on the corresponding regions in the five unseen cell types. Cell-conditioned feature fusion To integrate DNA sequences with scRNA-seq data, we evaluated three distinct strategies: feature-wise linear modulation (FiLM) 34 , cell linear addition, and a generated linear layer parameters approach. Feature-wise Linear Modulation (FiLM) Layer To integrate cell-type-specific contextual information into our model’s feature processing pipeline, we implemented a Feature-wise Linear Modulation (FiLM) layer. This module conditions the intermediate feature representations on a sample-specific basis. Let x ∈ ℝ C × L represent an intermediate feature tensor, with C channels and a sequence length of L . Let be the corresponding cell embedding vector, where d cell is the dimension of the embedding. The purpose of the FiLM layer is to dynamically generate channel-wise affine transformation parameters from e cell and apply them to x . The modulation parameters are generated by a dedicated two-layer Multi-Layer Perceptron (MLP) which takes the cell embedding e cell as input. The first hidden layer of the MLP projects the embedding into a space of dimension 2 C and applies a Rectified Linear Unit (ReLU) activation. This is followed by a second linear layer that maps this intermediate representation to the final conditioning vector. This process can be formally described as: where , and b 2 ∈ ℝ 2 C are learnable weight matrices and bias vectors of the MLP. The resulting output, γ ∈ ℝ 2 C , contains the concatenated modulation parameters for all channels. The conditioning vector γ is subsequently partitioned into two distinct vectors: a channel-wise scaling factor, s ∈ ℝ 2 C , and a shifting factor, β ∈ ℝ C , such that γ = [ s ‖ β ], where ‖ denotes concatenation. These parameters are then used to perform a channel-wise affine transformation on the input tensor. To enable broadcasting across the length dimension L , s and βare reshaped to s′ ∈ ℝ C ×1 and β ′ ∈ ℝ C ×1 , respectively. The final modulated feature tensor, x modulated , is computed as: where ⊙ denotes the element-wise Hadamard product. Cell linear addition To incorporate cellular context into our model, we employed a direct feature fusion mechanism. An intermediate feature tensor, x ∈ ℝ C× L , was first obtained from the output of a convolutional layer. In parallel, the original cell embedding vector, , was processed by a linear layer to project it to the same channel dimension as the feature tensor. This projection can be described as: where and b ∈ ℝ C are learnable parameters. The resulting projected vector, e proj ∈ ℝ C , was then fused with the feature matrix. To achieve this, the vector is broadcast across the length dimension and added element-wise to x . This operation can be explicitly written by first reshaping the vector to : Generated linear layer parameters To achieve a highly adaptive, cell-type-specific transformation, we employed a hypernetwork architecture. This approach dynamically generates the parameters (weights and biases) of a linear layer based on the cellular context provided by a cell embedding vector. Let x ∈ ℝ C × L be an intermediate feature matrix for a single sample, with C channels, and let be the corresponding cell embedding, where d cell is the embedding dimension. A parameter generation network, denoted as a function f θ , maps the cell embedding to a flattened vector containing all parameters required for a target linear layer projecting from C input features to C out output features. The generator f θ is a multilayer perceptron (MLP) with GELU activations. The generation process is given by: where the output contains the concatenated weight matrix and bias vector. This flat parameter vector is then reshaped and partitioned to yield the dynamic weight matrix and the dynamic bias vector . The dynamically generated linear layer is then applied to the input feature matrix. This is achieved via a matrix multiplication between the dynamic weights and the input features, followed by the addition of the dynamic bias: Baselines settings To benchmark our approach, we reproduced three representative methylation prediction methods, specifically CpGenie 14 , iDNA-ABT 15 , and INTERACT 17 . Given that these are site-level models, we extracted chromosomal CpG sites for training and evaluation to ensure a fair comparison while strictly adhering to the original model architectures. CpGenie utilizes a CNN composed of three convolutional layers with 128, 256, and 512 channels followed by max-pooling to extract features from 1001 bp input sequences. iDNA-ABT employs a 3-layer BERT architecture with a hidden dimension of 32 designed for 41 bp sequences. Finally, INTERACT processes 2 kb DNA sequences by first extracting features via a 512-channel 1D-CNN coupled with max-pooling, and then feeding these embeddings into an 8-layer BERT encoder to predict the final methylation level through a fully connected layer. For iDNA-ABF 16 , we found its pretrain model parameters suffered from numerical instability during training, so we didn’t compare performance with it and as a 41-bp based model, iDNA-ABT can represent its similar performance. Performance comparison Melody variants were optimized using a chromosome-wise data split wherein chr10 served as the validation set, chr8 and chr9 constituted the test set, and the remaining chromosomes were utilized for training across their respective cell types. To better evaluate the model performance, we add two small datasets, one is sampling from hypomethylated regions called sampling dataset, another is sampling from cell-type-specific datasets. The training procedure for Melody-G adhered to the aforementioned Two-stage training strategy. For performance assessment, we focused exclusively on CpG sites, quantifying predictive capability via AUC and Accuracy metrics within the designated evaluation regions. meQTLs dataset We assembled a unified multi-cohort resource by integrating three independent datasets: Ólafur et al., GTEx, and EPIGEN. From the Ólafur et al. study 8 , we obtained fine-mapped CpG-level meQTLs and coordinates of methylation-depleted sequences (MDSs) (Data S1; GRCh38, 1-based). The GTEx dataset 7 comprised cis-meQTLs mapped across nine tissues (breast, colon, kidney, lung, skeletal muscle, ovary, prostate, testis, whole blood) from 987 individuals, as described previously.The EPIGEN resource ( https://epicmeqtl.kcl.ac.uk/ ) included two complementary databases curated by the Epigenomics Research Group at King’s College London: (i) the EPIC database 20 , reporting meQTLs at 724,499 CpGs in 2,358 blood samples profiled using the Illumina EPIC array, and (ii) the Skin database, containing conditionally independent meQTLs identified in whole-skin tissue from up to 394 twins profiled with the Illumina 450K array. All datasets were harmonized to GRCh38 and standardized into a common variant–CpG format. To ensure high-confidence associations across platforms and cohorts, we retained only variant–CpG pairs with p < 1 × 10 −5 and an absolute methylation effect size greater than 0.5. These filters reduce spurious associations and emphasize variants with reproducible, biologically meaningful methylation changes. The resulting benchmark spans diverse tissues, methylation platforms, and linkage structures, providing a comprehensive and stringent evaluation set for assessing deep-learning models on meQTL effect prediction. Motif-centered allelic perturbation analysis Transcription factor motifs were obtained from the comprehensive compendium and grouped according to their archetype clusters 22 . For each cluster, we extracted the consensus sequence and converted it into a 4×L one-hot representation to enable precise sequence-level perturbations in the model input. To assess how individual regulatory motifs shape local DNA methylation patterns, we performed a systematic motif-insertion perturbation analysis across all selected CpG-containing regions. For each locus, a 10-kb window centred on the region was used to obtain baseline predictions from the multi-track methylation model, providing unmodified methylation probability profiles across 39 tissues. Motifs were then inserted into the same sequence at regularly spaced positions extending ±600 bp from the CpG interval, using 5-bp increments to capture fine-scale positional sensitivity. Insertions were executed both upstream and downstream of the CpG window, with genomic coordinates adjusted individually for each region. Following insertion, all modified sequences were re-evaluated with the model under identical conditions, generating perturbed methylation predictions for every tissue. The methylation effect of each motif was computed as the change in predicted methylation within the CpG interval relative to the unmodified sequence. Because CpG density varies across regions, all perturbation effects were normalized by the number of CpGs within each locus, yielding a position-specific, tissue-resolved estimate of the methylation shift attributable to motif insertion. This framework enabled a high-resolution quantification of motif influence on DNA methylation across diverse regulatory contexts. KEGG Quantifying the impact of each gene on methylation prediction involved an in silico perturbation approach. A baseline prediction was first generated using the original, unperturbed cell embeddings. Next, we systematically evaluated pre-computed embeddings corresponding to single-gene in silico knockouts. A directional impact score was then calculated for each gene as the difference between the mean prediction in the perturbed state and the baseline. A positive score indicated an inhibitory role on methylation, while a negative score suggested an activating role. Finally, these raw scores were transformed into a comparable importance score for each gene using piecewise min-max scaling. For interpreting the biological functions of the most impactful genes, we performed a pathway analysis using pre-computed KEGG enrichment results (KEGG 2021 Human 24 , via Enrichr 35 ). Pathways with an adjusted p-value below 0.05 were considered significant. For visualization, we ranked genes by their absolute importance scores and annotated the top performers according to their membership in the most significantly enriched pathways. Data and code availability All the codes are freely available at GitHub ( https://github.com/FakeEnd/Melody ). The developed web server is accessible via https://inner.wei-group.net/Melody/ and enables users to predict methylation levels across user-defined chromosomal regions (Supplementary Figure 1). Acknowledgments The work was jointly supported by the Natural Science Foundation of China (No. 62322112 and 62222311). Funder Information Declared the Natural Science Foundation of China , 62322112 , 62222311 References 1. ↵ Moore , L. D. , Le , T. & Fan , G. DNA methylation and its basic function . Neuropsychopharmacology 38 , 23 – 38 ( 2013 ). OpenUrl CrossRef PubMed Web of Science 2. ↵ Smith , Z. D. & Meissner , A. DNA methylation: roles in mammalian development . Nat. Rev. Genet . 14 , 204 – 220 ( 2013 ). OpenUrl CrossRef PubMed 3. ↵ Koch , A. et al. Analysis of DNA methylation in cancer: location revisited . Nat. Rev. Clin. Oncol . 15 , 459 – 466 ( 2018 ). OpenUrl CrossRef PubMed 4. Robertson , K. D. DNA methylation and human disease . Nat. Rev. Genet . 6 , 597 – 610 ( 2005 ). OpenUrl CrossRef PubMed Web of Science 5. ↵ Samblas , M. , Milagro , F. I. & Martínez , A. DNA methylation markers in obesity, metabolic syndrome, and weight loss . Epigenetics 14 , 421 – 444 ( 2019 ). OpenUrl CrossRef PubMed 6. ↵ Bell , C. G. et al. DNA methylation aging clocks: challenges and recommendations . Genome Biol . 20 , 249 ( 2019 ). OpenUrl CrossRef PubMed 7. ↵ Oliva , M. et al. DNA methylation QTL mapping across diverse human tissues provides molecular links between genetic variation and complex traits . Nat. Genet . 55 , 112 – 122 ( 2023 ). OpenUrl CrossRef PubMed 8. ↵ Stefansson , O. A. et al. The correlation between CpG methylation and gene expression is driven by sequence variants . Nat. Genet . 56 , 1624 – 1631 ( 2024 ). OpenUrl CrossRef PubMed 9. ↵ Li , Z. et al. Applications of deep learning in understanding gene regulation . Cell Rep. Methods 3 , 100384 ( 2023 ). OpenUrl PubMed 10. ↵ Sokolova , K. , Chen , K. M. , Hao , Y. , Zhou , J. & Troyanskaya , O. G. Deep learning sequence models for transcriptional regulation . Annu. Rev. Genomics Hum. Genet . 25 , 105 – 122 ( 2024 ). OpenUrl CrossRef PubMed 11. ↵ Avsec , Ž. et al. AlphaGenome: advancing regulatory variant effect prediction with a unified DNA sequence model . bioRxiv ( 2025 ) doi: 10.1101/2025.06.25.661532 . OpenUrl Abstract / FREE Full Text 12. ↵ Avsec , Ž. et al. Effective gene expression prediction from sequence by integrating long-range interactions . Nat. Methods 18 , 1196 – 1203 ( 2021 ). OpenUrl CrossRef PubMed 13. ↵ Angermueller , C. , Lee , H. J. , Reik , W. & Stegle , O. DeepCpG: accurate prediction of single-cell DNA methylation states using deep learning . Genome Biol . 18 , 67 ( 2017 ). OpenUrl CrossRef PubMed 14. ↵ Zeng , H. & Gifford , D. K. Predicting the impact of non-coding variants on DNA methylation . Nucleic Acids Res . 45 , e99 ( 2017 ). OpenUrl CrossRef PubMed 15. ↵ Yu , Y. et al. iDNA-ABT: advanced deep learning model for detecting DNA methylation with adaptive features and transductive information maximization . Bioinformatics 37 , 4603 – 4610 ( 2021 ). OpenUrl CrossRef PubMed 16. ↵ Jin , J. et al. iDNA-ABF: multi-scale deep biological language learning model for the interpretable prediction of DNA methylations . Genome Biol . 23 , 219 ( 2022 ). OpenUrl CrossRef PubMed 17. ↵ Zhou , J. , Weinberger , D. R. & Han , S. Deep learning predicts DNA methylation regulatory variants in specific brain cell types and enhances fine mapping for brain disorders . Sci. Adv . 11 , eadn1870 ( 2025 ). OpenUrl PubMed 18. ↵ Loyfer , N. et al. A DNA methylation atlas of normal human cell types . Nature 613 , 355 – 364 ( 2023 ). OpenUrl CrossRef PubMed 19. ↵ Kathail , P. et al. Current genomic deep learning models display decreased performance in cell type-specific accessible regions . Genome Biol . 25 , 202 ( 2024 ). OpenUrl CrossRef PubMed 20. ↵ Villicaña , S. et al. Genetic impacts on DNA methylation help elucidate regulatory genomic processes . Genome Biol . 24 , 176 ( 2023 ). OpenUrl CrossRef PubMed 21. ↵ Novakovsky , G. , Dexter , N. , Libbrecht , M. W. , Wasserman , W. W. & Mostafavi , S. Obtaining genetics insights from deep learning via explainable artificial intelligence . Nat. Rev. Genet . 24 , 125 – 137 ( 2023 ). OpenUrl CrossRef PubMed 22. ↵ Vierstra , J. et al. Global reference mapping of human transcription factor footprints . Nature 583 , 729 – 736 ( 2020 ). OpenUrl CrossRef PubMed 23. ↵ Monteagudo-Sánchez , A. , Noordermeer , D. & Greenberg , M. V. C. The impact of DNA methylation on CTCF-mediated 3D genome organization . Nat. Struct. Mol. Biol . 31 , 404 – 412 ( 2024 ). OpenUrl CrossRef PubMed 24. ↵ Kanehisa , M. , Furumichi , M. , Sato , Y. , Ishiguro-Watanabe , M. & Tanabe , M. KEGG: integrating viruses and cellular organisms . Nucleic Acids Res 49 , D545 – D551 ( 2021 ). OpenUrl CrossRef PubMed 25. ↵ KEGG, Kyoto Encyclopedia of Genes and Genomes . ( 2001 ). 26. ↵ Xu , J. et al. Epigenome-wide methylation haplotype association analysis identified HLA-DRB1, HLA-DRB5 and HLA-DQB1 as risk factors for rheumatoid arthritis . Int J Immunogenet 50 , 291 – 298 ( 2023 ). OpenUrl CrossRef PubMed 27. Wu , X. et al. Single-cell sequencing of immune cells from anticitrullinated peptide antibody positive and negative rheumatoid arthritis . Nat Commun 12 , 4977 ( 2021 ). OpenUrl CrossRef PubMed 28. ↵ Weinand , K. et al. The chromatin landscape of pathogenic transcriptional cell states in rheumatoid arthritis . Nat Commun 15 , 4650 ( 2024 ). OpenUrl CrossRef PubMed 29. ↵ Ronneberger , O. , Fischer , P. & Brox , T. U-Net: Convolutional Networks for Biomedical Image Segmentation . arXiv [cs.CV] ( 2015 ) doi: 10.48550/ARXIV.1505.04597 . OpenUrl CrossRef 30. ↵ Wolf , F. A. , Angerer , P. & Theis , F. J. SCANPY: large-scale single-cell gene expression data analysis . Genome Biol 19 , 15 ( 2018 ). OpenUrl CrossRef PubMed 31. ↵ Hao , M. et al. Large-scale foundation model on single-cell transcriptomics . Nat Methods 21 , 1481 – 1491 ( 2024 ). OpenUrl CrossRef PubMed 32. ↵ Cui , H. et al. scGPT: toward building a foundation model for single-cell multi-omics using generative AI . Nat Methods 21 , 1470 – 1480 ( 2024 ). OpenUrl CrossRef PubMed 33. ↵ Zeng , Y. et al. CellFM: a large-scale foundation model pre-trained on transcriptomics of 100 million human cells . Nat Commun 16 , 4679 ( 2025 ). OpenUrl CrossRef PubMed 34. ↵ Perez , E. , Strub , F. , de Vries , H. , Dumoulin , V. & Courville , A. FiLM: Visual reasoning with a general conditioning layer . arXiv [cs.CV] ( 2017 ) doi: 10.48550/ARXIV.1709.07871 . OpenUrl CrossRef 35. ↵ Xie , Z. et al. Gene Set Knowledge Discovery with Enrichr . Curr Protoc 1 , e90 ( 2021 ). OpenUrl CrossRef View the discussion thread. Back to top Previous Next Posted November 25, 2025. Download PDF Supplementary Material Email Thank you for your interest in spreading the word about bioRxiv. NOTE: Your email address is requested solely to identify you as the sender of this article. Your Email * Your Name * Send To * Enter multiple addresses on separate lines or separate them with commas. You are going to email the following Melody: Decoding the Sequence Determinants of Locus-Specific DNA Methylation Across Human Tissues Message Subject (Your Name) has forwarded a page to you from bioRxiv Message Body (Your Name) thought you would like to see this page from the bioRxiv website. Your Personal Message CAPTCHA This question is for testing whether or not you are a human visitor and to prevent automated spam submissions. Share Melody: Decoding the Sequence Determinants of Locus-Specific DNA Methylation Across Human Tissues Junru Jin , Ding Wang , Jianbo Qiao , Wenjia Gao , Yuhang Liu , Siqi Chen , Quan Zou , Shu Wu , Ran Su , Leyi Wei bioRxiv 2025.11.23.689975; doi: https://doi.org/10.1101/2025.11.23.689975 Share This Article: Copy Citation Tools Melody: Decoding the Sequence Determinants of Locus-Specific DNA Methylation Across Human Tissues Junru Jin , Ding Wang , Jianbo Qiao , Wenjia Gao , Yuhang Liu , Siqi Chen , Quan Zou , Shu Wu , Ran Su , Leyi Wei bioRxiv 2025.11.23.689975; doi: https://doi.org/10.1101/2025.11.23.689975 Citation Manager Formats BibTeX Bookends EasyBib EndNote (tagged) EndNote 8 (xml) Medlars Mendeley Papers RefWorks Tagged Ref Manager RIS Zotero Tweet Widget Facebook Like Google Plus One Subject Area Bioinformatics Subject Areas All Articles Animal Behavior and Cognition (7635) Biochemistry (17697) Bioengineering (13895) Bioinformatics (41951) Biophysics (21456) Cancer Biology (18594) Cell Biology (25520) Clinical Trials (138) Developmental Biology (13381) Ecology (19903) Epidemiology (2067) Evolutionary Biology (24323) Genetics (15612) Genomics (22510) Immunology (17737) Microbiology (40401) Molecular Biology (17183) Neuroscience (88622) Paleontology (667) Pathology (2833) Pharmacology and Toxicology (4825) Physiology (7644) Plant Biology (15158) Scientific Communication and Education (2046) Synthetic Biology (4296) Systems Biology (9825) Zoology (2271)

Text is read by the "Ask this paper" AI Q&A widget below. Extraction quality varies by source — PMC NXML preserves structure cleanly, OA-HTML may include some navigation residue, and OA-PDF can have broken hyphenation. The publisher copy (via DOI) is the canonical version.

My notes (saved in your browser only)

Ask this paper AI returns verbatim quotes from the full text · source: preprint-html

Answers must be backed by verbatim quotes from this paper's full text. Hallucinated quotes are dropped automatically; if no verbatim passage answers the question, we say so. How this works

Citation neighborhood (no data yet)

We don't have any in-corpus citations linked to this paper yet. This is a recent paper (2025) — citers typically take a year or two to land, and the OpenAlex reference graph may still be filling in.

Source provenance

europepmc
last seen: 2026-05-20T01:45:00.602351+00:00