Combined analysis of pleiotropy and epistasis