Latent variable models for non-Gaussian data with applications to genome-wide variation