Fig. 9: DeepMod2 feature extraction and BiLSTM deep-learning model architecture.

For each CpG locus on a read, DeepMod2 extracts 19 features per read base in a 21-bp window centered at the cytosine of interest. The feature matrix is given as an input to a deep learning model, such as BiLSTM (shown in this figure) or Transformer, to predict methylation probability. DeepMod2 uses pruned neural networks by default to improve inference speed.