British drug giant GlaxoSmithKline is investing $300 million in consumer genetics company 23andMe, forging a four-year collaboration to discover medicines using human genetics as a guide.

The partnership establishes GSK as 23andMe’s exclusive collaborator for drug target discovery, the companies said Wednesday. It comes with an option to extend for a fifth year, and funding and proceeds will be split equally.

The announcement comes as GSK embarks on a new research strategy under new Chief Scientific Officer Hal Barron, a drug industry veteran. The new approach focuses on the immune system, genetics and advanced analytics and technology.

It’s not the first time a pharmaceutical company has turned to genetics to improve its drug development. Amgen acquired Iceland’s deCODE Genetics in 2012 for $415 million to benefit from its unique genetic database, while Regeneron has partnered with Geisinger Health and the UK Biobank to do the same.

23andMe is a different kind of partner. It’s a direct-to-consumer genetic testing company that charges $199 for certain health and ancestry data ($99 just for ancestry). The company has more than 5 million customers, 80 percent of whom have consented to participating in research.

It doesn’t have the traditional health records that a system like Geisinger does, but conducts surveys of its users, and says, on average, one person in its database contributes to 200 different research studies.

The company has been focused on drug development of its own, hiring Genentech veteran Richard Scheller in 2015 as chief scientific officer and head of therapeutics.

Together, the companies aim to use 23andMe’s genetic database to improve selection of drug targets, finding medicines that are more likely to work and carry a lower safety risk. The collaboration is also designed to speed identification and recruitment of patients for clinical trials.