## 2 Materials and Methods
### Architecture of 6 mAPred-MSFF
#### 2.2.1 Sequence Embedding Module  
DNA sequences are consisting of four nucleotides: \"A\" (adenine), \"G\" (guanine), \"C\" (cytosine), and \"T\" (thymine). Undetermined bases are annotated as \"N\". The DNA sequences can be expressed as \(S~{}=~{}s_{1},s_{2},\ldots s_{L}\) where \(s_{i}\) is the \(i\)-th word and the \(L\) is the length of the sequence. We use four encoding methods to define 'words' in DNA sequences including 1-gram, _NAC_, 2-grams, and _DNC_. 1-gram encoding method. The n-grams are the set of all possible subsequences of nucleobases [39]. One-gram encoding sets the n-grams number \(n\) to 1. As a result, the 1-gram nucleobase sequences include 'A', 'T', 'C', 'G'. We define a dictionary that maps the  
Figure 1: The flowchart of 6 mAPred-MSFF. The sequence embedding module uses four different encoding schemes (1-gram, _NAC_, 2-grams, _DNC_) for the input of the embedding layer. Next, the feature matrices are fed into the feature extraction module to capture and combine the global and local features, respectively. Afterwards, the local and global contexts of the four different encoding schemes are aggregated into the feature fusion module. Finally, the output of the feature fusion module is fed into the prediction module to predict the 6 mA site of a certain species. nucleotides to numbers, such as A (adenine) to 1, T (thymine) is 2, C (cytosine) to 3, and G (guanine) to 4. In this way, we map a DNA sequence into a real number vector of length 41, which is denoted as \(V_{i,1-gram}\):  
\[V_{i,1-gram}=[v_{1}v_{2}v_{3}\ldots v_{39}v_{40}v_{41}]_{i},\quad v\in[1,2,3,4] \tag{1}\]  
_NAC_ encoding method. The Nucleic Acid Composition (_NAC_) encoding calculates the frequency of each nucleic acid type in a nucleotide sequence. The frequencies of all four natural nucleic acids (i.e., \"_ATCG_\") can be calculated as:  
\[f_{NAC}(t)=\frac{N(t)}{N},\quad t\in\{A,T,C,G\} \tag{2}\]  
for a DNA sequence \(S\) of length \(L\), and it can be converted into a vector of length 4, which is denoted as \(V_{i,NAC}\):  
\[V_{i,NAC}=\left[f_{NAC}(A),f_{NAC}(T),f_{NAC}(C),f_{NAC}(G)\right]_{i} \tag{3}\]  
2-gram encoding method. A 2-gram encoding sets the n-grams number \(n\) to 2. We split the DNA sequences into overlapping n-gram nucleobases. The total possible number is 16, since there are four types of nucleobases. For example, we split a DNA sequence into overlapping 2-gram nucleobase sequences as follows: \(GTTGT\ldots\)\(CTT\rightarrow\)'\(GT\)', \(TT\)', \(TG\)', '\(GT\)',..., '\(CT\)', '\(TT\)'. We define a dictionary that maps the 2-gram nucleobase sequences to the 1-16 numbers set. In this way, we map a DNA sequence into a real number vector of length 40, which donates \(V_{i,2-gram}\):  
\[V_{i,2-gram}=[v_{1}v_{2}v_{3}\ldots v_{39}v_{40}]_{i},\quad v\in[1,2,3,\ldots 1 4,15,16] \tag{4}\]  
_DNC_ encoding method. The Di-Nucleotide Composition (_DNC_) encoding calculates the frequency of every two nucleic acid types in a nucleotide sequence which gives 16 descriptors. It is defined as:  
\[f_{DNC}(r,s)=\frac{N_{n}}{N-1},\quad r,s\in\{A,T,C,G\} \tag{5}\]  
where \(N_{rs}\) is the number of di-nucleotide represented by nucleic acid types \(r\) and \(s\). For a DNA sequence \(S\) of length \(L\), it can be converted into a vector of length 16, which is donated as \(V_{i,DNC}\):  
\[V_{i,DNC}=\left[f_{DNC}(AA),f_{DNC}(AC),\ldots,f_{DNC}(TC),f_{DNC}(TG)\right]_ {i} \tag{6}\]  
Next, the vectors \(V_{i,1-gram}\), \(V_{i,NAC}\), \(V_{i,2-gram}\), and \(V_{i,DNC}\) are fed to an embedding layer, transforming into learnable embedding vectors.