Assessing modularity in genetic networks to manage spatially structured metapopulations