New test helps doctors tailor treatment for individual patients