Myriad Genetics Inc., a Salt Lake City-based genetics testing company, has agreed to sell its Myriad myPath Melanoma Laboratory to Castle Biosciences of Friendswood, Texas. Castle will buy the laboratory, which offers the myPath Melanoma test, for $32.5 million in cash.

Castle Biosciences is a specialty laboratory focused on advanced diagnostics for dermatologic cancers.

“We are pleased to sign an agreement with Castle Biosciences that meets our objective of ensuring patients continue to have access to this important test and providing value for our shareholders,” said Paul J. Diaz, president and CEO of Myriad Genetics. “The divestiture of Myriad myPath Melanoma will allow Myriad to focus on its core businesses in women’s health, oncology and mental health and provide growth capital for future investment.”

MyPath Melanoma has been used by almost 40,000 patients to guide treatment decisions and has been ordered by approximately 20 percent of dermatopathologists in the country.

The deal is subject to customary closing requirements and Myriad expects the transaction to close in its fiscal second quarter.