Condensed Consolidated Statements of Cash Flows (unaudited) - USD ($)
$ in Thousands
9 Months Ended
Sep. 30, 2016
Sep. 30, 2015
Statement Of Cash Flows [Abstract]    
Net loss $ (85,182) $ (49,754)
Adjustments to reconcile net loss to net cash used in operating activities:    
Depreciation and amortization 941 544
Stock-based compensation expense 8,102 2,940
Noncash interest expense 772  
Noncash interest income (107)  
Impairment of intangible asset 0 2,761
Changes in fair value of contingent consideration (50) (2,980)
Other gains, net   10
Changes in operating assets and liabilities    
Accounts receivable and other current assets 4,621 (1,466)
Accounts payable and accrued expenses 1,474 9,524
Other liabilities and other assets (438) (569)
Net cash used in operating activities (69,867) (38,990)
Investing activities    
Purchase of fixed assets (314) (686)
Purchase of marketable securities (93,250)  
Proceeds from maturities of marketable securities 24,966  
(Increase) decrease in restricted cash (1,197) 211
Net cash used in investing activities (69,795) (475)
Financing activities    
Proceeds from exercise of stock options 11 245
Proceeds from issuance of long-term debt, net of costs and debt discount   19,357
Proceeds from sale of common stock 61,287 70,435
Net cash provided by financing activities 61,298 90,037
Net decrease in cash and cash equivalents (78,364) 50,572
Cash and cash equivalents at beginning of period 131,302 95,856
Cash and cash equivalents at end of period $ 52,938 146,428
SUPPLEMENTAL DISCLOSURES OF CASH FLOW INFORMATION    
Fair value of warrants issued   289
Receivable from sale of stock   $ 1,000