*3.3. Phylogenetic Analysis of the NLR Genes*

To trace the evolutionary history of the NLR genes in Arecaceae, a phylogenetic tree was constructed based on the amino acid sequences of the NBS domain, using three *Amborella* TNL proteins as the outgroups (Figure 3 and Data S1). The results show that NLR genes from the five species form two monophyletic clades with high support values (>90%) (Figure S1). The two deeply diverged clades correspond to the RNL and CNL subclasses, respectively (Figure 3a), supporting the ancient separation of the two NLR clades (Figure S1; Data S1). Compared to the CNL clade, the branch lengths of the RNL clade were relatively short (Figure 3a), suggesting that RNL genes had a slow evolutionary rate. Within the CNL clade, clustering of NLR genes from a single species was frequently observed (Figure 3a), which is caused by species-specific gene duplications.

**Figure 3.** Phylogenetic tree of CNL and RNL genes based on conserved NBS domain sequences. (**a**) A total of 1408 CNL and 9 RNL sequences were used: 536 sequences from *D. jenkinsiana* (shown in red), 135 from *C. nucifera* (green), 399 from *C. simplicifolius* (purple), 262 from *E. guineensis* (blue), and 85 from *P. dactylifera* (black). Four TNL sequences from Arabidopsis thaliana were used as an outgroup. (**b**) Number variations of NLR genes at different stages of Arecaceae species evolution. Differential gene losses and gains are indicated by numbers with − or + on each branch. (**c**) Arecaceae ancestral lineage genes were inherited by *C. simplicifolius*, *D. jenkinsiana, P. dactylifera*, *E. guineensis* and *C. nucifera*, respectively.

To gain insight into the evolution of the NLR genes during the speciation of the five Arecaceae species, Notung software was used to reconcile gene duplication/loss events of the NLR genes at each node of the phylogenetic tree [34]. The result reveals that at least 101 ancestral NLR lineages (2 RNL and 99 CNL) may have existed in the common ancestor of the five Arecaceae species (Figure S1 and Data S1). We term these ancestral NLR lineages as "Arecaceae NLR lineage". The common ancestor of *P. dactylifera*, *E. guineensis* and *C. nucifera* (Pd-Eg-Cn) inherited 85 Arecaceae NLR lineages but lost 16. These Arecaceae NLR lineages further expanded to 114 NLR lineages before the divergence of the *P. dactylifera*, *E. guineensis* and *C. nucifera* (Pd-Eg-Cn). The common ancestor of *C. simplicifolius* and *D. jenkinsiana* (Cs-Dj) inherited 61 Arecaceae NLR lineages and duplicated to 154 Cs-Dj NLR lineages (Figure 3b). Subsequent gene loss and gain during the divergence of Pd-Eg-Cn and Cs-Dj lineages further shaped the NLR content in the five Arecaceae species, resulting in the current distinct NLR profile in these species. By assigning the NLR genes in each species to the 114 ancestral Arecaceae NLR lineages, the results showed that 32, 56, 38, 58 and 63 Arecaceae NLR lineages were inherited by *C. simplicifolius*, *D. jenkinsiana, P. dactylifera*, *E. guineensis* and *C. nucifera*, respectively (Figure 3c). Among these ancestral NLR lineages, only five of them were reserved in all five genomes, and 20 lineages were species-specific (*D. jenkinsiana*, eight; *P. dactylifera*, one; *C. simplicifolius*, zero; *E. guineensis*, six; *C. nucifera*, five). The remaining 89 lineages were differentially preserved in two to four species (Figure 3c).

#### *3.4. Tracing the Trajectory of NLR Gene Evolution in Different Arecaceae Species*

Based on the traced loss and gain of NLR genes at each species divergence node, the evolutionary trajectory of NLR genes for each of the five species can be traced. After separation from the common ancestor of the five Arecaceae species (Cs-Dj-Pd-Eg-Cn node), 40 gene-loss and 93 gain events were detected at the Cs-Dj node (Figure 3b), suggesting a pattern of NLR expansion during this period. The Cs-Dj node then diverged to generate *C. simplicifolius* and *D. jenkinsiana*. In *C. simplicifolius*, 81 NLR genes inherited from the *Cs-Dj* were lost, while the remaining NLR genes underwent intensive gene duplication, leading to the generation of 106 new members (Figure 3b). Again, a pattern of NLR expansion occurred during the period from *Cs-Dj* to *C. simplicifolius*. Taken together, a "consistent expansion" of NLR genes occurred during the evolution of *C. simplicifolius* from the common ancestor of the five Arecaceae species (Figure 4d). Using this strategy, a similar pattern of "consistent expansion" was also observed for NLR genes in *D. jenkinsiana* and *E. guineensis* (Figure 4b,e). However, a different pattern of "first expansion and then contraction" was observed for the other species, *P. dactylifera* and *C. nucifera* (Figure 4a,c).

**Figure 4.** Dynamic evolutionary patterns of NLR genes among different evolutionary states of five Arecaceae species. (**a**) *P. dactylifera*. (**b**) *E. guineensis*. (**c**) *C. nucifera*. (**d**) *C. simplicifolius*. (**e**) *D. jenkinsiana*.
