4. Explainability¶

Page 4 of 9. previous: 3. Classification | index | next: 5. Methylation versus expression

A classifier that is right is not yet useful for biology. The question here is which CpG sites carry each subgroup call, and whether those sites sit in genes that make sense.

Integrated gradients attribute a prediction to the input features. The method moves the input from a baseline (here the mean training profile) to the actual tumour in small steps and sums the gradient of the predicted class along the path. The result is one number per CpG: positive when the tumour's methylation at that site pushes the call towards the class, negative when it pushes away. Attributions were computed on the four-group MLP and averaged over the correctly classified training tumours of each subgroup.

Each CpG is annotated from the Illumina manifest with its gene, its position relative to the gene (promoter regions TSS200, TSS1500, 5'UTR and first exon; or gene body), and whether the subgroup is hyper- or hypomethylated at that site relative to the other subgroups.

InĀ [1]:
import json
import pandas as pd
from IPython.display import Image, display
from pathlib import Path
TAB = Path('../results/tables')
FIG = Path('../results/figures')
pd.set_option('display.width', 160)
pd.set_option('display.max_columns', 30)
pd.set_option('display.max_colwidth', 90)
InĀ [2]:
display(Image(FIG / 'top_cpgs_per_group.png'))
No description has been provided for this image
InĀ [3]:
top = pd.read_csv(TAB / 'top_cpgs_per_group.csv')
top.groupby('group').head(10)[['group', 'cpg', 'gene', 'region', 'cpg_island', 'direction', 'mean_attribution', 'delta_beta_vs_rest']]
Out[3]:
group cpg gene region cpg_island direction mean_attribution delta_beta_vs_rest
0 WNT cg20020844 SP6 5'UTR S_Shore hypermethylated 0.01680 0.64205
1 WNT cg02704158 NaN NaN N_Shore hypermethylated 0.01575 0.68853
2 WNT cg06590268 NaN NaN Island hypermethylated 0.01559 0.61425
3 WNT cg08031151 NaN NaN N_Shore hypermethylated 0.01549 0.66551
4 WNT cg15892785 GPR153 3'UTR Island hypermethylated 0.01489 0.60862
5 WNT cg17769084 NaN NaN Island hypermethylated 0.01480 0.66948
6 WNT cg14174502 NaN NaN NaN hypomethylated 0.01462 -0.61974
7 WNT cg22855020 SLC20A2 5'UTR NaN hypomethylated 0.01451 -0.71315
8 WNT cg07188009 NaN NaN S_Shelf hypomethylated 0.01423 -0.59633
9 WNT cg03807298 NaN NaN Island hypermethylated 0.01410 0.75737
50 SHH cg17741809 LIPA Body NaN hypermethylated 0.01870 0.76322
51 SHH cg09060654 LIPA Body NaN hypermethylated 0.01599 0.67444
52 SHH cg10959440 SASH1 Body NaN hypermethylated 0.01566 0.82187
53 SHH cg20406460 NaN NaN Island hypermethylated 0.01555 0.75759
54 SHH cg14060518 NaN NaN S_Shore hypermethylated 0.01550 0.85124
55 SHH cg20608895 NaN NaN NaN hypermethylated 0.01458 0.79116
56 SHH cg09624466 OTX2OS1 TSS1500 Island hypermethylated 0.01419 0.73754
57 SHH cg24699146 HMGCL TSS1500 NaN hypermethylated 0.01393 0.67032
58 SHH cg15416279 NaN NaN Island hypermethylated 0.01384 0.68151
59 SHH cg21039708 OTX2OS1 TSS1500 Island hypermethylated 0.01362 0.74751
100 Group3 cg12565585 RIMS2 Body Island hypermethylated 0.02691 0.66683
101 Group3 cg13993183 NaN NaN S_Shore hypermethylated 0.02420 0.62160
102 Group3 cg25900085 MIR124-2 TSS200 S_Shore hypomethylated 0.02405 -0.60381
103 Group3 cg26939946 RNF112 TSS200 NaN hypermethylated 0.02381 0.62858
104 Group3 cg06807993 MIR657 TSS1500 N_Shelf hypermethylated 0.02117 0.56362
105 Group3 cg05437476 NaN NaN Island hypermethylated 0.02113 0.58834
106 Group3 cg13899017 CADM3 Body Island hypermethylated 0.02093 0.51826
107 Group3 cg12880095 NaN NaN NaN hypomethylated 0.02084 -0.53614
108 Group3 cg04045327 GAK Body N_Shore hypermethylated 0.02045 0.64178
109 Group3 cg06925984 NaN NaN Island hypermethylated 0.02043 0.55999
150 Group4 cg25624478 NFASC Body N_Shelf hypomethylated 0.01870 -0.66123
151 Group4 cg11033271 CDCA7L Body N_Shore hypermethylated 0.01854 0.64637
152 Group4 cg24615189 KCNIP1 TSS1500 NaN hypermethylated 0.01580 0.55875
153 Group4 cg26947766 KCNIP1 TSS1500 NaN hypermethylated 0.01495 0.52704
154 Group4 cg22365240 NaN NaN NaN hypermethylated 0.01431 0.63464
155 Group4 cg05494467 PCDHGB5 3'UTR N_Shore hypomethylated 0.01383 -0.49128
156 Group4 cg23146346 RBM24 TSS200 S_Shore hypomethylated 0.01340 -0.54943
157 Group4 cg04585185 C21orf34 Body NaN hypomethylated 0.01328 -0.44517
158 Group4 cg16918905 NaN NaN Island hypomethylated 0.01316 -0.53323
159 Group4 cg01968133 CASZ1 Body N_Shelf hypomethylated 0.01310 -0.64693

The full list, 50 CpGs per subgroup, is in results/tables/top_cpgs_per_group.csv. Two things stand out. First, most top CpGs are hypomethylated in their subgroup. Loss of promoter methylation switches a gene on, so the model mostly recognises subgroups by programs that are turned on, not off. Second, many top CpGs sit in genes of neuronal and developmental identity rather than in the known driver genes. This is expected. Drivers such as CTNNB1, PTCH1 or MYC are defined by mutation or amplification. Methylation records lineage, and lineage is what separates the subgroups.

Whether these sites actually control expression is the question of the next page.

Page 4 of 9. previous: 3. Classification | index | next: 5. Methylation versus expression