| Certain Balance Sheet Items [Abstract] | Period [Axis] | 
|---|
2016-01-01 - 2016-12-31  | 
|---|
Certain Balance Sheet Items [Abstract]  |    | 
Summary of Accounts Receivable, Net  | Accounts receivable, net consisted of the following (in thousands):  |   |  |  |  |  |  |  |  |  |     |    | December 31,  2016  |    | December 31,  2015  |  Accounts receivable from revenues under collaborative agreements  |    | $  | 6,151  | 
 
  |    | $  | 25,939  | 
 
  |  Accounts receivable from product sales to collaborators  |    | 7,854  | 
 
  |    | 4,996  | 
 
  |  Accounts receivable from other product sales  |    | 2,234  | 
 
  |    | 2,442  | 
 
  |  Total accounts receivable  |    | 16,239  | 
 
  |    | 33,377  | 
 
  |  Allowance for distribution fees and discounts  |    | (559  | )  |    | (967  | )  |  Total accounts receivable, net  |    | $  | 15,680  | 
 
  |    | $  | 32,410  | 
 
  |  
     | 
Summary of Inventories  | Inventories consisted of the following (in thousands):  |   |  |  |  |  |  |  |  |  |     |    | December 31,  2016  |    | December 31,  2015  |  Raw materials  |    | $  | 761  | 
 
  |    | $  | 677  | 
 
  |  Work-in-process  |    | 12,850  | 
 
  |    | 8,481  | 
 
  |  Finished goods  |    | 1,012  | 
 
  |    | 331  | 
 
  |  Total inventories  |    | $  | 14,623  | 
 
  |    | $  | 9,489  | 
 
  |  
     | 
Prepaid Expenses and Other Assets, Current  | Prepaid expenses and other assets consisted of the following (in thousands):  |   |  |  |  |  |  |  |  |  |     |    | December 31,  2016  |    | December 31,  2015  |  Prepaid manufacturing expenses  |    | $  | 9,663  | 
 
  |    | $  | 16,155  | 
 
  |  Prepaid research and development expenses  |    | 8,613  | 
 
  |    | 9,225  | 
 
  |  Other prepaid expenses  |    | 1,661  | 
 
  |    | 1,198  | 
 
  |  Other assets  |    | 1,530  | 
 
  |    | 530  | 
 
  |  Total prepaid expenses and other assets  |    | 21,467  | 
 
  |    | 27,108  | 
 
  |  Less long-term portion  |    | 219  | 
 
  |    | 5,574  | 
 
  |  Total prepaid expenses and other assets, current  |    | $  | 21,248  | 
 
  |    | $  | 21,534  | 
 
  |  
     | 
Summary of Property and Equipment, Net  | Property and equipment, net consisted of the following (in thousands):  |   |  |  |  |  |  |  |  |  |     |    | December 31,  2016  |    | December 31,  2015  |  Research equipment  |    | $  | 10,479  | 
 
  |    | $  | 9,666  | 
 
  |  Computer and office equipment  |    | 3,373  | 
 
  |    | 2,570  | 
 
  |  Leasehold improvements  |    | 2,331  | 
 
  |    | 2,025  | 
 
  |  Subtotal  |    | 16,183  | 
 
  |    | 14,261  | 
 
  |  Accumulated depreciation and amortization  |    | (11,919  | )  |    | (10,318  | )  |  Property and equipment, net  |    | $  | 4,264  | 
 
  |    | $  | 3,943  | 
 
  |  
 
     | 
Schedule of Accrued Expenses  | Accrued expenses consisted of the following (in thousands):  |   |  |  |  |  |  |  |  |  |     |    | December 31,  2016  |    | December 31,  2015  |  Accrued compensation and payroll taxes  |    | $  | 11,539  | 
 
  |    | $  | 8,636  | 
 
  |  Accrued outsourced research and development expenses  |    | 9,522  | 
 
  |    | 8,617  | 
 
  |  Accrued outsourced manufacturing expenses  |    | 3,225  | 
 
  |    | 6,205  | 
 
  |  Other accrued expenses  |    | 4,552  | 
 
  |    | 4,118  | 
 
  |  Total accrued expenses  |    | 28,838  | 
 
  |    | 27,576  | 
 
  |  Less long-term accrued outsourced research and development expenses  |    | 17  | 
 
  |    | 784  | 
 
  |       Total accrued expenses, current  |    | $  | 28,821  | 
 
  |    | $  | 26,792  | 
 
  |  
     | 
Summary of Deferred Revenue  | Deferred revenue consisted of the following (in thousands):  |   |  |  |  |  |  |  |  |  |     |    | December 31,  2016  |    | December 31,  2015  |  Collaborative agreements  |    |    |    |    |  License fees and event-based payments:  |    |    |    |    |  Roche  |    | $  | 35,709  | 
 
  |    | $  | 39,038  | 
 
  |  Other  |    | 8,209  | 
 
  |    | 9,724  | 
 
  |     |    | 43,918  | 
 
  |    | 48,762  | 
 
  |  Reimbursement for research and development services  |    | 700  | 
 
  |    | 4,461  | 
 
  |  Total deferred revenue  |    | 44,618  | 
 
  |    | 53,223  | 
 
  |  Less current portion  |    | 4,793  | 
 
  |    | 9,304  | 
 
  |  Deferred revenue, net of current portion  |    | $  | 39,825  | 
 
  |    | $  | 43,919  | 
 
  |  
     |