AC-PCA: simultaneous dimension reduction and adjustment for confounding variation