A prerequisite to improve the predictability of microbial community dynamics is to understand the mechanisms of microbial assembly. To study factors that contribute to microbial community assembly, we examined the temporal dynamics of genes in five aquatic metagenome time-series, originating from marine offshore or coastal sites and one lake. With this trait-based approach we expected to find gene-specific patterns of temporal allele variability that depended on the seasonal metacommunity size of carrier-taxa and the variability of the milieu and the substrates to which the resulting proteins were exposed. In more detail, we hypothesized that a larger seasonal metacommunity size would result in increased temporal variability of functional units (i.e., gene alleles), as shown previously for taxonomic units. We further hypothesized that multicopy genes would feature higher temporal variability than single-copy genes, as gene multiplication can result from high variability in substrate quality and quantity. Finally, we hypothesized that direct exposure of proteins to the extracellular environment would result in increased temporal variability of the respective gene compared to intracellular proteins that are less exposed to environmental fluctuations. The first two hypotheses were confirmed in all data sets, while significant effects of the subcellular location of gene products was only seen in three of the five time-series. The gene with the highest allele variability throughout all data sets was an iron transporter, also representing a target for phage infection. Previous work has emphasized the role of phage-prokaryote interactions as a major driver of microbial diversity. Our finding therefore points to a potentially important role of iron transporter-mediated phage infections for the assembly and maintenance of diversity in aquatic prokaryotes.