|
7 | 7 | "source": [ |
8 | 8 | "# scEEMS Model Training Tutorial\n", |
9 | 9 | "\n", |
10 | | - "This notebook implements the scEEMS (Single-Cell Enhanced Expression Modifier Scores) training methodology as outlined in the manuscript. The scEEMS model predicts the probability of a genetic variant is a cell-specific eQTL based on fine-mapping data from single cell eQTL data and as a function of thousands of variant and gene annotations.\n", |
11 | | - "\n" |
| 10 | + "This notebook implements the scEEMS (single-cell Enhanced Expression Modifier Scores) training methodology as outlined in the manuscript. scEEMS is a machine learning framework that predicts whether a genetic variant is a causal cell-type-specific eQTL as a function of 4,839 variant, gene, and variant-gene pair features. The models are trained on fine-mapped single-cell eQTL data from six brain cell types (astrocytes, excitatory neurons, inhibitory neurons, microglia, oligodendrocytes, and oligodendrocyte precursor cells) from the ROSMAP cohort, with applications to identifying functional variants relevant to Alzheimer's disease.\n" |
12 | 11 | ] |
13 | 12 | }, |
14 | 13 | { |
|
18 | 17 | "source": [ |
19 | 18 | "## Motivation\n", |
20 | 19 | "\n", |
21 | | - "Traditional genetic studies only explain 5% of Alzheimer's disease heritability. The remaining 95% \"missing heritability\" occurs because bulk tissue approaches cannot capture regulatory effects that occur in specific cell types. Our machine learning approach identifies genetic variants that affect gene expression specifically in brain cell types like microglia, potentially explaining previously undetected disease mechanisms.\n", |
| 20 | + "### The \"Missing Regulation\" Problem\n", |
22 | 21 | "\n", |
23 | | - "- Our Motivation is to create a reproducible pipeline that accurately predicts functional genetic variants using cell-type specific genomic annotations, transforming complex research findings into a standardized tool for the broader scientific community." |
| 22 | + "Most disease-associated GWAS variants lie in non-coding regions of the genome, where they likely modulate gene expression. However, bulk-tissue eQTL studies fail to explain the majority of these variants, a phenomenon termed \"missing regulation\" [(Connally et al., 2022)](https://elifesciences.org/articles/74970v1). This gap exists because there are systematic differences between variants identified in eQTL studies versus disease GWAS [(Mostafavi et al., 2022)](https://www.nature.com/articles/s41588-023-01529-1):\n", |
| 23 | + "\n", |
| 24 | + "- **eQTLs** are enriched in promoter regions and affect genes under weaker selective constraint\n", |
| 25 | + "- **GWAS variants** are enriched in distal enhancer regions and affect genes under stronger selective constraint\n", |
| 26 | + "\n", |
| 27 | + "Understanding how non-coding GWAS variants modulate gene expression is critical for uncovering disease mechanisms, but several challenges limit our ability to make these connections:\n", |
| 28 | + "\n", |
| 29 | + "1. **Cell-type specificity**: Bulk tissue approaches cannot capture regulatory effects that occur in specific cell types, particularly rare but disease-relevant populations like microglia in Alzheimer's disease\n", |
| 30 | + "2. **Enhancer variants**: Disease-associated variants in distal enhancers often have weaker eQTL signals that fail to reach statistical significance, especially in underpowered single-cell studies\n", |
| 31 | + "3. **Limited sample sizes**: Single-cell eQTL mapping has reduced statistical power compared to bulk studies, making it difficult to detect true regulatory signals in rare cell types\n", |
| 32 | + "\n", |
| 33 | + "### scEEMS Solution\n", |
| 34 | + "\n", |
| 35 | + "scEEMS addresses these challenges by predicting causal cell-type-specific eQTLs using machine learning trained on 4,839 genomic features, including:\n", |
| 36 | + "- Deep learning-based variant effect predictions\n", |
| 37 | + "- Cell-type-specific regulatory annotations \n", |
| 38 | + "- Activity-by-Contact (ABC) enhancer-gene linkages\n", |
| 39 | + "- Distance and evolutionary constraint features\n", |
| 40 | + "\n", |
| 41 | + "By identifying functional variants in cell-type-specific contexts—particularly in enhancer regions—scEEMS aims to bridge the gap between non-coding GWAS variants and their target genes, improving our understanding of disease mechanisms in Alzheimer's disease.\n", |
| 42 | + "\n", |
| 43 | + "### Tutorial Objective\n", |
| 44 | + "\n", |
| 45 | + "This notebook provides a reproducible pipeline for training scEEMS models, demonstrating the complete methodology from data preparation through model evaluation. The goal is to enable the broader scientific community to apply this approach to their own cell-type-specific eQTL datasets and disease contexts." |
24 | 46 | ] |
25 | 47 | }, |
26 | 48 | { |
|
30 | 52 | "source": [ |
31 | 53 | "## Methods Overview\n", |
32 | 54 | "\n", |
33 | | - "### Feature-Weighted CatBoost Algorithm\n", |
34 | | - "We use a single **CatBoost** (Categorical Boosting) gradient boosting model optimized for genomic data. CatBoost builds an ensemble of decision trees sequentially, where each tree learns from previous errors, making it particularly effective for high-dimensional biological datasets with mixed data types.\n", |
| 55 | + "### CatBoost Algorithm\n", |
| 56 | + "We use [CatBoost](https://github.com/catboost/catboost), a gradient boosting framework that builds an ensemble of decision trees sequentially. CatBoost is effective for high-dimensional biological datasets with mixed data types.\n", |
35 | 57 | "\n", |
36 | | - "**Our Training Strategy**: Single feature-weighted model (Model 5) that emphasizes biology-informed features while maintaining comprehensive genomic context.\n", |
| 58 | + "### Model Training Strategy\n", |
| 59 | + "\n", |
| 60 | + "We train a CatBoost model with 10x upweighting of deep learning features (feature weight = 10 for DL-VEP features vs. 1 for other features). This model was selected as optimal based on external validation and heritability analysis described in the manuscript.\n", |
37 | 61 | "\n", |
38 | 62 | "### Training Data Construction\n", |
39 | | - "**Data Source**: Chromosome 2 variants with non-overlapping splits\n", |
40 | | - "- **Training set**: 3,056 variants (80% of available data)\n", |
41 | | - "- **Testing set**: 761 variants (20% of available data)\n", |
42 | | - "- **Critical validation**: Zero variant overlap between training and testing sets\n", |
43 | | - "\n", |
44 | | - "**Label Definition (Y)**:\n", |
45 | | - "- Y = 1: Functional eQTL (PIP > 0.1) - variant significantly affects gene expression\n", |
46 | | - "- Y = 0: Non-functional variant (PIP < 0.01) - no detectable expression effect\n", |
47 | | - "- **Class distribution**: 9% positive rate reflects biological reality that most variants are non-functional" |
| 63 | + "\n", |
| 64 | + "**Data Source**: Fine-mapped single-cell eQTLs from six brain cell types (astrocytes, excitatory neurons, inhibitory neurons, microglia, oligodendrocytes, and oligodendrocyte precursor cells) in the ROSMAP cohort.\n", |
| 65 | + "\n", |
| 66 | + "**Positive Class (Y=1)**:\n", |
| 67 | + "- Variants with PIP > 0.05 in a credible set where the maximum PIP exceeds 0.1, OR\n", |
| 68 | + "- Variants with PIP > 0.5 regardless of credible set membership\n", |
| 69 | + "\n", |
| 70 | + "**Negative Class (Y=0)**: \n", |
| 71 | + "- For each positive variant, we sample 10 negative variants from the same gene with PIP < 0.01, matched on variant type (SNP, insertion, deletion)\n", |
| 72 | + "\n", |
| 73 | + "**Test Set**:\n", |
| 74 | + "- Positive variants: PIP > 0.90\n", |
| 75 | + "- Negative variants: 10 matched variants per positive variant with PIP < 0.01\n", |
| 76 | + "- Restricted to MEGA genes only\n", |
| 77 | + "\n", |
| 78 | + "### Sample Weighting\n", |
| 79 | + "\n", |
| 80 | + "- Negative variants: weight = 1\n", |
| 81 | + "- Positive variants: weighted proportional to their PIP values\n", |
| 82 | + "- Total weight balanced between positive and negative classes\n", |
| 83 | + "\n", |
| 84 | + "### Cross-Validation: Leave-One-Chromosome-Out (LOCO)\n", |
| 85 | + "\n", |
| 86 | + "For each of the 22 autosomes:\n", |
| 87 | + "1. Train on variants from all other 21 chromosomes\n", |
| 88 | + "2. Test on the held-out chromosome\n", |
| 89 | + "3. Aggregate predictions from all 22 held-out chromosomes for final performance metrics\n", |
| 90 | + "\n", |
| 91 | + "---\n", |
| 92 | + "\n", |
| 93 | + "### Toy Dataset Note\n", |
| 94 | + "\n", |
| 95 | + "This tutorial uses chromosome 2 data only for demonstration:\n", |
| 96 | + "- Training: 3,056 variants \n", |
| 97 | + "- Testing: 761 variants (non-overlapping)\n", |
| 98 | + "- The full study trained models across all 22 chromosomes for each of 6 cell types" |
48 | 99 | ] |
49 | 100 | }, |
50 | 101 | { |
|
0 commit comments