23andMe built up a huge dataset – at a profit – by selling DNA tests to the public.

Now the human genome research company has tapped the sprawling set of medical data it harvested as a result, to successfully licensed its first drug compound; selling rights to the anti-inflammatory to Spanish drugmaker Almirall SA.

The success for the company was first announced in a regulatory filing in Spain on Thursday. It’s a major win for the company, earlier described by Nature as “the most visible face of direct-to-consumer genetic testing” and a powerful example of the power of Big Data, and creativity in securing original datasets for monetisation.

To critics 23andMe is harvesting intensively personal material from customers, then monetising their DNA: a golden case of having your cake and eating it. To supporters, the anonymised datasets are being put to good use and the Bay area-based company, which has raised $786.1 million in funding over 16 rounds, should be applauded.

Read this: These Data Trusts are a Taste of the Future

The drug licensed targets a family of proteins associated with a range of autoimmune and inflammatory diseases, including Crohn’s disease and lupus.

“Working with Almirall, we’re pleased to be furthering 23andMe’s mission of helping people benefit from genetic insights,” said Kenneth Hillan, 23andMe’s head of therapeutics. “We felt Almirall was the best company to take this program forward and ultimately develop an effective therapy for patients.”

Some 80 percent of 23andMe’s 10 million customers have consented to the company’s using their genetic information for drug discovery.

Among the company’s other projects is a collaboration with the Psychiatric Genomics Consortium (PGC) that is believed to be the largest multi-ethnic study of the genetics of depression conducted to-date.

23andMe recently had to warn users, however, not to download their raw DNA data then upload it to third-party services that offer fresh interpretations, or offer to find genetic relatives. Among the reasons it warned users off: “Within databases that allow for raw DNA data uploads with access to relative matching features, people with malicious intent can upload real or fake “Trojan Horse” genetic profiles for access to your personal identifying information. They could even infer your specific DNA variants—such as information about any disease risk variants you might carry. ”