When it comes to biotech stocks, the recent focus has been on companies working on coronavirus treatments or prevention. While it's fine to jump on that bandwagon, there are other biotech investment opportunities that may not double in value overnight but will surely bear fruit in the long term.

I'm thinking of Vertex Pharmaceuticals (NASDAQ:VRTX) and BioMarin Pharmaceutical (NASDAQ:BMRN). Shares of both companies fell as the market crashed but have proved their resilience in the following weeks. Vertex and BioMarin now are up 30% and 25%, respectively, this year. Meanwhile, the S&P 500 is down 5.7%. Here's why these two stocks are a buy right now.

The diagnosis cystic fibrosis is written on a clipboard, surrounded by medication.

Image source: Getty Images.

1. Vertex

Vertex is a leader in treatments for cystic fibrosis, a progressive genetic disease that affects various organs but is most known for its impact on the lungs. That portfolio of products may contribute more than $10 billion to revenue in 2028, according to Morningstar.

Vertex also is working on investigational drugs for pain, sickle cell disease, and beta thalassemia. Those programs are in phase 2 or earlier studies, so revenue there is years down the road. Even though Vertex's cystic fibrosis revenue is climbing, additional disease areas offer future growth potential that may compensate for any slowdown in sales of older drugs.

For now, though, a cystic fibrosis drug approved in October is proving to be key to revenue growth. Trikafta, a combination medication with the potential to treat up to 90% of people with cystic fibrosis, generated $420 million in the fourth quarter -- its first quarter on the market -- and revenue more than doubled to $895 million in the first quarter. Including Trikafta, Vertex has four products on the market.

Vertex's annual revenue has climbed for the past five years, and in spite of the coronavirus slowing some clinical trials, the company has faced limited headwinds from the current health crisis. Total product revenue increased 77%, led by Trikafta, in the first quarter. And Vertex revised total product revenue higher for the year -- to a range of $5.3 billion to $5.6 billion from the range of $5.1 billion to $5.3 billion.

With Vertex, revenue is on the rise and there's potential for medicines in disease areas beyond cystic fibrosis, so now may be a good time to invest in Vertex.

2. BioMarin

BioMarin has seven products on the market, each for rare genetic diseases such as late infantile neuronal ceroid lipofuscinosis type 2 (CLN2) -- a pediatric brain disorder -- and phenylketonuria (PKU) -- a metabolic disorder.

Annual revenue has been climbing at BioMarin for more than a decade, and that trend seems likely to continue. Palynziq, approved for PKU in 2018, posted a 181% increase in first-quarter revenue due to maintenance treatments and new patients. And sales of Brineura for CLN2 rose 97% as it gained new patients worldwide. Overall, total revenue rose 25% to $502 million for the quarter.

Chief executive officer Jean-Jacques Bienaime said in the earnings report that 2020 would be "transformational" for BioMarin for two reasons. For the full year, the company expects to be profitable for the first time on a GAAP basis. And the potential approval of BioMarin's valoctocogene roxaparvovec would make it the first approval of a gene therapy for any type of hemophilia.

The Food and Drug Administration (FDA) is reviewing valoctocogene roxaparvovec for severe hemophilia A and is set to issue a decision by Aug. 21. European regulatory authorities are also reviewing the treatment, and their decision is expected by early next year. In the bleeding disorder hemophilia A, patients don't have enough of clotting factor VIII. BioMarin's infusion introduces a new gene that would enable the body to produce factor VIII. About 20,000 Americans are living with the disorder, according to the Hemophilia Federation of America.

As for the coronavirus, BioMarin isn't immune to its impact. The company reduced full-year guidance for sales of most of its products, primarily due to interruptions like missed infusion appointments or delays to start new treatments. This is temporary and doesn't change my outlook on the company.

BioMarin's annual revenue history, the gains in product revenue (outside of coronavirus impact), and the potential approval of the company's hemophilia A drug are reasons these biotech shares are a buy right now.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.