Asymptotic Analysis of MAP Estimation via the Replica Method and Compressed Sensing