Roche struck a $1.7 billion cancer drug pact with Blueprint Medicines, as advances in genetic testing for rare mutations drive lucrative deals for expensive treatments.

Eli Lilly and Co.’s LOXO-292, an experimental cancer drug the company acquired in January 2019 as part of an $8 billion takeover of Loxo Oncology, shrank tumors in nearly 70 percent of advanced lung cancer patients whose tumors carried specific abnormalities in the RET gene.