Methods for inferring dynamical systems from biological data with applications to HIV latency and genetic drivers of aging