There's no easy way to spin this: Affymetrix (NASDAQ:AFFX) is hurting. After taking a beating last quarter, the company got pounded again in the second quarter, as its turnaround from the lows of 2006 fizzled out.

To make mataters worse, its closest competitor, Illumina (NASDAQ:ILMN), is on fire -- in a good way, I mean.

Affymetrix's revenue slipped 1.6% for the quarter. Most of that loss is due to the loss of royalty income from its partnership with Roche. The income stream ended at the end of last year, but Affymetrix was expecting that growth in product sales would more than make up for it. Unfortunately, pharmaceutical companies aren't buying its equipment -- sales to those companies fell 30% year over year. 

That probably shouldn't come as a big surprise. After all, big pharma is trying to improve its own bottom line. Pfizer (NYSE:PFE) cut research and development costs by 9% this quarter, and Bristol-Myers Squibb (NYSE:BMY) is spending less on R&D as a fraction of revenue.

The good news is that academia is still buying Affymetrix's products, and the instruments already installed in pharmaceutical companies are still generating income from the consumables they use, to the tune of 16% year-over-year growth. Unfortunately, the 31% year-over-year drop in instrument sales will affect the growth of those consumable sales in future quarters.

Perhaps the most troubling development for the quarter was that gross margin slipped 540 basis points to 57%.

For its own cost-cutting measures, Affymetrix announced a plan to consolidate manufacturing plants, which could save the company between $20 million and $25 million annually once it's completed next year. Alas, it'll cost the company about $42 million to complete the consolidation, to the tune of $26 million over the rest of this year, and $16 million in the first half of next year.

Even with lower margins, the company eked out a smaller operating loss than a year ago. The savior was lower selling, general, & administrative expenses. Unfortunately, unlike last year's second quarter, interest income wasn't enough to bring Affymetrix out of the red; significantly higher interest expense didn't help. In short, the company ended the quarter with a $0.05-per-share loss instead, of last year's $0.02 in profits.

Affymetrix is a turnaround story waiting to happen. The only question is when that turnaround will occur. The stock dropped a bit more than 25% today, owing both to the results and the lowered guidance for the rest of the year, so it probably won't be this year. Unfortunately, the company lowered guidance just before reporting the first quarter, too.

Given all this, I'll need to see the turnaround in instrument sales begin before I'd rank Affymetrix as one of the best opportunities this decade.

Affymetrix is a Rule Breakers pick. The newsletter is always on the hunt for hot drug stocks and other cutting-edge picks. See all of our latest discoveries with a free 30-day trial subscription.

Fool contributor Brian Orelli, Ph.D., doesn't own shares of any company mentioned in this article. Pfizer is a pick of both the Income Investor and Inside Value newsletters. The Fool has a disclosure policy.