Note 12 - Subsequent Events (Details Textual) | Sep. 23, 2019USD ($) | Sep. 10, 2019USD ($)$ / sharesshares | Aug. 19, 2019 | Aug. 14, 2019USD ($)$ / sharesshares | Aug. 08, 2019USD ($) | Jul. 30, 2019USD ($) | Jul. 26, 2019USD ($) | Jul. 24, 2019USD ($)$ / sharesshares | Jul. 08, 2019shares | Jun. 24, 2019USD ($)shares | May 15, 2019USD ($)$ / sharesshares | May 14, 2019USD ($)$ / sharesshares | May 10, 2019USD ($)$ / sharesshares | May 10, 2019BRL (R$)shares | May 03, 2019USD ($)$ / sharesshares | May 02, 2019USD ($) | Apr. 29, 2019USD ($)$ / sharesshares | Apr. 26, 2019USD ($)$ / sharesshares | Apr. 16, 2019USD ($)$ / sharesshares | Apr. 15, 2019USD ($) | Apr. 04, 2019USD ($) | Jun. 30, 2020USD ($) | Oct. 01, 2019 | Sep. 30, 2019 | Sep. 29, 2019USD ($) | Sep. 19, 2019USD ($) | Sep. 17, 2019USD ($) | Sep. 16, 2019USD ($) | Aug. 29, 2019USD ($)$ / shares | Aug. 28, 2019$ / shares | Aug. 01, 2019USD ($) | Jul. 29, 2019USD ($) | Jul. 18, 2019 | Jul. 10, 2019USD ($)$ / shares | Jun. 11, 2019USD ($) | Apr. 08, 2019USD ($) | Mar. 31, 2019USD ($) | Dec. 31, 2018USD ($) | Dec. 10, 2018USD ($) | Aug. 17, 2018$ / shares |
Long-term Debt, Gross | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $ 229,272,000 | $ 228,921,000 | | |
Long-term Debt, Total | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 215,827,000 | 209,697,000 | | |
July Foris Credit Agreement [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Class of Warrant or Right, Exercise Price of Warrants or Rights | $ / shares | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $ 7.52 |
Convertible Debt [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Long-term Debt, Gross | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 126,754,000 | 126,306,000 | | |
Long-term Debt, Total | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 125,559,000 | $ 120,874,000 | | |
Convertible Senior Notes, 6.0% Due in 2021 [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Interest Rate, Stated Percentage | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6.00% | 6.00% | |
Debt Instrument, Face Amount | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $ 60,000,000 | |
Long-term Debt, Gross | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 60,000,000 | | | |
Convertible Senior Notes, 6.0% Due in 2021 [Member] | Convertible Debt [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Long-term Debt, Gross | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 60,000,000 | $ 60,000,000 | | |
Long-term Debt, Total | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 60,048,000 | 57,918,000 | | |
August 2013 Convertible Notes [Member] | Convertible Debt [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Long-term Debt, Gross | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4,863,000 | 4,415,000 | | |
Long-term Debt, Total | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $ 4,267,000 | $ 4,345 | | |
DSM International B.V. [Member] | The 2019 DSM Credit Agreement [Member] | Forecast [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Proceeds from Sale of Equity Securities, Gross, Trigger Repayment of Amounts Outstanding Under Line of Credit | | | | | | | | | | | | | | | | | | | | | | $ 50,000,000 | | | | | | | | | | | | | | | | | | |
Subsequent Event [Member] | Private Placement [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Warrant Exercise, Beneficial Common Stock Ownership Maximum Percentage | | | | | | | | | | | | | | | 19.99% | | | | | | | | | | | | | | | | | | | | | | | | | |
Proceeds from Issuance of Common Stock | | | | | | | | | | | | | | | $ 5,000,000 | | $ 5,800,000 | $ 23,200,000 | | | | | | | | | | | | | | | | | | | | | | |
Subsequent Event [Member] | LSA Amendment Warrants [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Class of Warrant or Right, Number of Securities Called by Warrants or Rights | shares | | | | 1,438,829 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Class of Warrant or Right, Exercise Price of Warrants or Rights | $ / shares | | | | $ 2.87 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Warrants and Rights Outstanding, Term | | | | 2 years | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Warrant Exercise, Beneficial Common Stock Ownership Maximum Percentage | | | | 19.99% | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Subsequent Event [Member] | July Foris Credit Agreement [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Class of Warrant or Right, Exercise Price of Warrants or Rights | $ / shares | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $ 2.87 | | | | | | |
Subsequent Event [Member] | Warrants Issued for 2014 Rule 144A Convertible Notes Exchanges [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Class of Warrant or Right, Stock Ownership Percentage, Restriction on Ability to Exercise | | | | | | | | | | | 4.99% | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Subsequent Event [Member] | August Foris Credit Agreement [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Class of Warrant or Right, Number of Securities Called by Warrants or Rights | shares | | | | 4,871,795 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Class of Warrant or Right, Exercise Price of Warrants or Rights | $ / shares | | | | $ 3.90 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Class of Warrant or Right, Term | | | | 2 years | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Class of Warrant or Right, Stock Ownership Percentage, Restriction on Ability to Exercise | | | | 19.99% | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Subsequent Event [Member] | Warrants Issued in Exchange for 6% Convertible Notes Due 2021 [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Class of Warrant or Right, Number of Securities Called by Warrants or Rights | shares | | | | | | | | 2,000,000 | | 181,818 | 2,000,000 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Class of Warrant or Right, Exercise Price of Warrants or Rights | $ / shares | | | | | | | | | | | $ 5.12 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Repayment Price, Percent of Face Amount | | | | | | | | | | | 4.99% | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Class of Warrant or Right, Term | | | | | | | | | | 2 years | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Subsequent Event [Member] | Warrants Issued in Exchange for Convertible Senior Notes, 6.0% Due 2021, Second Exchange [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Class of Warrant or Right, Number of Securities Called by Warrants or Rights | shares | | | | | | | | 2,000,000 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Class of Warrant or Right, Exercise Price of Warrants or Rights | $ / shares | | | | | | | | $ 2.87 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Class of Warrant or Right, Term | | | | | | | | | | | 2 years | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Subsequent Event [Member] | Warrants Issued in Exchange for August 2013 Financing Convertible Note [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Class of Warrant or Right, Number of Securities Called by Warrants or Rights | shares | | | | | | | | | 1,080,000 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Class of Warrant or Right, Stock Ownership Percentage, Restriction on Ability to Exercise | | | | | | | | | 4.99% | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Subsequent Event [Member] | Investor Warrants [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Class of Warrant or Right, Number of Securities Called by Warrants or Rights | shares | | 3,205,128 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Class of Warrant or Right, Exercise Price of Warrants or Rights | $ / shares | | $ 3.90 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Warrants and Rights Outstanding, Term | | 2 years | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Warrants or Rights Outstanding, Maximum Percent of Common Stock Outstanding | | 9.99% | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Warrants or Rights Outstanding, Reduction in Exercise Price | | 10.00% | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Warrants or Rights Outstanding, Additional Reduction in Exercise Price | | 5.00% | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Subsequent Event [Member] | Minimum [Member] | Investor Warrants [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Class of Warrant or Right, Exercise Price of Warrants or Rights | $ / shares | | $ 3.31 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Subsequent Event [Member] | Foris Ventures, LLC [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Related Party Transaction, Purchases from Related Party | | | | | | | | | | | | | | | | | | | | $ 2,500,000 | | | | | | | | | | | | | | | | | | | | |
Subsequent Event [Member] | Raizen Energia S.A. [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Capital Contribution to the Joint Venture | R$ | | | | | | | | | | | | | | R$ 2500000 | | | | | | | | | | | | | | | | | | | | | | | | | | |
Equity Method Investment, Ownership Percentage | | | | | | | | | | | | | 50.00% | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Equity Method Investment, Ownership Percentage by Counterparty | | | | | | | | | | | | | 50.00% | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Subsequent Event [Member] | Raizen Energia S.A. [Member] | Fixed Assets Owned by the Company [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Payments to Acquire Property, Plant, and Equipment, Total | | | | | | | | | | | | | $ 9,000,000 | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Subsequent Event [Member] | Raizen Energia S.A. [Member] | Fixed Assets From Sao Martinho S.A. [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Payments to Acquire Property, Plant, and Equipment, Total | | | | | | | | | | | | | $ 3,000,000 | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Subsequent Event [Member] | Loan and Security Agreement Amendment and Waiver [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Interest Rate, Stated Percentage | | | 4.75% | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Long-term Debt, Gross | | | | $ 71,000,000 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Subsequent Event [Member] | Loan and Security Agreement Amendment and Waiver [Member] | Unsecured Promissory Note [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Face Amount | | | | $ 32,500,000 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Subsequent Event [Member] | Loan and Security Agreement Amendment and Waiver [Member] | Base Rate [Member] | Minimum [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Basis Spread on Variable Rate | | | 9.00% | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Subsequent Event [Member] | Loan and Security Agreement Amendment and Waiver [Member] | Base Rate [Member] | Maximum [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Basis Spread on Variable Rate | | | 12.00% | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Subsequent Event [Member] | Convertible Senior Notes, 6.0% Due in 2021 [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Face Amount | | | | | | | | | | | $ 68,300,000 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Repayment Price, Percent of Face Amount | | | | | | | 125.00% | | | | 125.00% | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Debt Conversion, Original Debt, Amount | | | | | | | $ 4,700,000 | $ 53,300,000 | | $ 4,700,000 | $ 53,300,000 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Penalty for Failure to Make Payment, Premium Increase Percentage | | | | | | | | | | | 25.00% | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Periodic Payment, Principal | | | | | | | | | | | $ 6,400,000 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Subsequent Event [Member] | Convertible Senior Notes, 6.0%, Due in 2021, Second Exchange [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Interest Rate, Stated Percentage | | | | | | | | 18.00% | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Face Amount | | | | | | | | $ 68,300,000 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Periodic Payment, Principal | | | | | | | | $ 3,200,000 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Debt Default, Amount | | | | | | | | | | | | | | | | | | | | | | | | | | | | $ 63,600,000 | | | | | | | | | | | | |
Subsequent Event [Member] | August 2013 Convertible Notes [Member] | Convertible Debt [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Debt Conversion, Converted Instrument, Shares Issued | shares | | | | | | | | | 1,767,632 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Subsequent Event [Member] | Nikko Loan Agreement [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Interest Rate, Stated Percentage | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5.00% | | | | | | | | |
Long-term Debt, Total | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $ 5,000,000 | | | | | | | | |
Subsequent Event [Member] | Nikko Loan Agreement, First Installment [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Face Amount | | | | | | $ 3,000,000 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Proceeds from Issuance of Long-term Debt, Total | | | | | | 2,800,000 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Subsequent Event [Member] | Nikko Loan Agreement, Second Installment [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Face Amount | | | | | $ 2,000,000 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Proceeds from Issuance of Long-term Debt, Total | | | | | 1,900,000 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Subsequent Event [Member] | Second Aprinnova Note [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Interest Rate, Stated Percentage | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 10.00% | | | | | | | | | |
Debt Instrument, Face Amount | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $ 2,018,000,000 | | | | | | | | | |
Subsequent Event [Member] | The Naxyris Loan Agreement [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Interest Rate, Stated Percentage | | | | 12.00% | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Face Amount | | | | $ 10,435,000 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Failure to Pay Fee | | | | 6.00% | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Subsequent Event [Member] | The Naxyris Loan Agreement [Member] | Interest Wtih Respect to Indebtedness [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Basis Spread on Variable Rate | | | | 0.25% | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Subsequent Event [Member] | The Investor Notes [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Interest Rate, Stated Percentage | | 12.00% | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Face Amount | | $ 12,500,000 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Early Repayment Amount, Percentage | | 100.00% | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Subsequent Event [Member] | Secured Promissory Note In Connection With Termination of Ginkgo Collaboration Agreement [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Interest Rate, Stated Percentage | | | | | | | | | | | | | | | | | | | | | | | 12.00% | | 10.50% | | | | | | | | | | | | | | | |
Debt Instrument, Cash Waiver Fee Amount Payable | | | | | | | | | | | | | | | | | | | | | | | | | $ 1,300,000 | | | | | | | | | | | | | | | |
Subsequent Event [Member] | Great American Capital Partners, LLC [Member] | Loan and Security Agreement [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Requirement, Unrestricted, Unencumbered Cash | | | | | | | | | | | | | | | | | | | | | $ 15,000,000 | | | | | | | | | | | | | | | | | | | |
Payments for debt agreement amendment | | | | | | | | | | | | | | | | | | | | | $ 800,000 | | | | | | | | | | | | | | | | | | | |
Subsequent Event [Member] | Foris Ventures, LLC [Member] | April Foris Credit Agreement [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Interest Rate, Stated Percentage | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0.00% | | | | |
Debt Instrument, Face Amount | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $ 8,000,000 | | | | |
Line of Credit Facility, Maximum Borrowing Capacity | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8,000,000 | | | | |
Subsequent Event [Member] | Foris Ventures, LLC [Member] | April Foris Credit Agreement [Member] | Minimum [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Fee Amount | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1,000,000 | | | | |
Subsequent Event [Member] | Foris Ventures, LLC [Member] | April Foris Credit Agreement [Member] | Maximum [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Fee Amount | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $ 500,000 | | | | |
Subsequent Event [Member] | Foris Ventures, LLC [Member] | June Foris Credit Agreement [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Interest Rate, Stated Percentage | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 12.50% | | | | | |
Debt Instrument, Face Amount | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $ 8,500,000 | | | | | |
Line of Credit Facility, Maximum Borrowing Capacity | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $ 8,500,000 | | | | | |
Subsequent Event [Member] | Foris Ventures, LLC [Member] | July Foris Credit Agreement [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Interest Rate, Stated Percentage | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 12.50% | | | | | | |
Debt Instrument, Face Amount | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $ 8,000,000 | | | | | | |
Line of Credit Facility, Maximum Borrowing Capacity | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 16,000,000 | | | | | | |
Long-term Line of Credit, Total | | | | | | | $ 8,000,000 | | | | | | | | | | | | | | | | | | | | | | | | | | | $ 8,000,000 | | | | | | |
Subsequent Event [Member] | Foris Ventures, LLC [Member] | Foris Credit Agreements [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Repayment Price, Percent of Face Amount | | | | | | | | | | | | | | | | | | | | | | | | 100.00% | | | | | | | | | | | | | | | | |
Subsequent Event [Member] | Foris Ventures, LLC [Member] | August Foris Credit Agreement [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Interest Rate, Stated Percentage | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 12.00% | | | | | | | | | | | |
Debt Instrument, Face Amount | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $ 19,000,000 | | | | | | | | | | | |
Line of Credit Facility, Maximum Borrowing Capacity | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $ 19,000,000 | | | | | | | | | | | |
Debt Instrument, Repayment Price, Percent of Face Amount | | | | | | | | | | | | | | | | | | | | | | | | 100.00% | | | | | | | | | | | | | | | | |
Subsequent Event [Member] | DSM International B.V. [Member] | The 2019 DSM Credit Agreement [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Interest Rate, Stated Percentage | | | | | | | | | | | | | | | | | | | | | | | | | | | 12.50% | | | | | | | | | | | | | |
Line of Credit Facility, Maximum Borrowing Capacity | | | | | | | | | | | | | | | | | | | | | | | | | | | $ 8,000,000 | | | | | | | | | | | | | |
Subsequent Event [Member] | DSM International B.V. [Member] | The 2019 DSM Credit Agreement, Second Installment [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Face Amount | | | | | | | | | | | | | | | | | | | | | | | | | | $ 3,000,000 | | | | | | | | | | | | | | |
Line of Credit Facility, Incremental Draw Down Amount | | | | | | | | | | | | | | | | | | | | | | | | | | $ 3,000,000 | 3,000,000 | | | | | | | | | | | | | |
Subsequent Event [Member] | DSM International B.V. [Member] | The 2019 DSM Credit Agreement, Third Installment [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Face Amount | $ 2,000,000 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Extinguishment of Debt, Amount | 1,500,000 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Line of Credit Facility, Incremental Draw Down Amount | $ 2,000,000 | | | | | | | | | | | | | | | | | | | | | | | | | | 2,000,000 | | | | | | | | | | | | | |
Subsequent Event [Member] | DSM International B.V. [Member] | The 2019 DSM Credit Agreement, First Installment [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Face Amount | | | | | | | | | | | | | | | | | | | | | | | | | | | 3,000,000 | | | | | | | | | | | | | |
Line of Credit Facility, Incremental Draw Down Amount | | | | | | | | | | | | | | | | | | | | | | | | | | | $ 3,000,000 | | | | | | | | | | | | | |
Subsequent Event [Member] | The Investors [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Line of Credit Facility, Maximum Borrowing Capacity | | $ 12,500,000 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Subsequent Event [Member] | Foris Ventures, LLC [Member] | Private Placement [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Stock Issued During Period, Shares, New Issues | shares | | | | | | | | | | | | | | | | | | 2,832,440 | 6,732,369 | | | | | | | | | | | | | | | | | | | | | |
Shares Issued, Price Per Share | $ / shares | | | | | | | | | | | | | | | | | | $ 5.12 | $ 2.87 | | | | | | | | | | | | | | | | | | | | | |
Proceeds from Issuance of Common Stock | | | | | | | | | | | | | | | | | | | $ 20,000,000 | | | | | | | | | | | | | | | | | | | | | |
Subsequent Event [Member] | Foris Ventures, LLC [Member] | Private Placement, April 26, 2019 [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Class of Warrant or Right, Number of Securities Called by Warrants or Rights | shares | | | | | | | | | | | | | | | | | | 3,983,230 | | | | | | | | | | | | | | | | | | | | | | |
Class of Warrant or Right, Exercise Price of Warrants or Rights | $ / shares | | | | | | | | | | | | | | | | | | $ 5.12 | | | | | | | | | | | $ 3.90 | $ 3.90 | | | | | | | | | | |
Class of Warrant or Right, Term | | | | | | | | | | | | | | | | | | 2 years | | | | | | | | | | | | | | | | | | | | | | |
Subsequent Event [Member] | Foris Ventures, LLC [Member] | Warrants Issued for 2014 Rule 144A Convertible Notes Exchanges [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Class of Warrant or Right, Exercise Price of Warrants or Rights | $ / shares | | | | | | | | | | | | $ 4.56 | | | | | | | | | | | | | | | | | | $ 3.90 | | | | | | | | | | |
Class of Warrant or Right, Term | | | | | | | | | | | | 2 years | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Debt Conversion, Converted Instrument, Warrants Issued | shares | | | | | | | | | | | | 352,638 | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Subsequent Event [Member] | Foris Ventures, LLC [Member] | Private Placement, April 16, 2019 [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Class of Warrant or Right, Number of Securities Called by Warrants or Rights | shares | | | | | | | | | | | | | | | | | | | 5,424,804 | | | | | | | | | | | | | | | | | | | | | |
Class of Warrant or Right, Exercise Price of Warrants or Rights | $ / shares | | | | | | | | | | | | | | | | | | | $ 2.87 | | | | | | | | | | | | | | | | | | | | | |
Class of Warrant or Right, Term | | | | | | | | | | | | | | | | | | | 2 years | | | | | | | | | | | | | | | | | | | | | |
Subsequent Event [Member] | Foris Ventures, LLC [Member] | Rule 144A Convertible Notes [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Debt Conversion, Original Debt, Amount | | | | | | | | | | | | $ 5,000,000 | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Debt Conversion, Converted Instrument, Shares Issued | shares | | | | | | | | | | | | 1,122,460 | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Subsequent Event [Member] | Other Non-affiliated Investors [Member] | Private Placement [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Stock Issued During Period, Shares, New Issues | shares | | | | | | | | | | | | | | | 1,243,781 | | 323,382 | 2,043,781 | | | | | | | | | | | | | | | | | | | | | | |
Shares Issued, Price Per Share | $ / shares | | | | | | | | | | | | | | | $ 4.02 | | $ 4.02 | $ 4.02 | | | | | | | | | | | | | | | | | | | | | | |
Subsequent Event [Member] | Other Non-affiliated Investors [Member] | Private Placement, April 26, 2019 [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Class of Warrant or Right, Number of Securities Called by Warrants or Rights | shares | | | | | | | | | | | | | | | | | | 1,635,025 | | | | | | | | | | | | | | | | | | | | | | |
Class of Warrant or Right, Exercise Price of Warrants or Rights | $ / shares | | | | | | | | | | | | | | | | | | $ 5.02 | | | | | | | | | | | | | | | | | | | | | | |
Warrants and Rights Outstanding, Term | | | | | | | | | | | | | | | | | | 2 years | | | | | | | | | | | | | | | | | | | | | | |
Subsequent Event [Member] | Other Non-affiliated Investors [Member] | Warrants Issued for 2014 Rule 144A Convertible Notes Exchanges [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Class of Warrant or Right, Exercise Price of Warrants or Rights | $ / shares | | | | | | | | | | | | | $ 5.02 | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Class of Warrant or Right, Term | | | | | | | | | | | | | 2 years | 2 years | | | | | | | | | | | | | | | | | | | | | | | | | | |
Debt Conversion, Converted Instrument, Warrants Issued | shares | | | | | | | | | | | | | 1,391,603 | 1,391,603 | | | | | | | | | | | | | | | | | | | | | | | | | | |
Subsequent Event [Member] | Other Non-affiliated Investors [Member] | Private Placement April 29, 2019 [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Class of Warrant or Right, Number of Securities Called by Warrants or Rights | shares | | | | | | | | | | | | | | | | | 258,704 | | | | | | | | | | | | | | | | | | | | | | | |
Class of Warrant or Right, Exercise Price of Warrants or Rights | $ / shares | | | | | | | | | | | | | | | | | $ 5.02 | | | | | | | | | | | | | | | | | | | | | | | |
Warrants and Rights Outstanding, Term | | | | | | | | | | | | | | | | | 2 years | | | | | | | | | | | | | | | | | | | | | | | |
Subsequent Event [Member] | Other Non-affiliated Investors [Member] | Private Placement May 3, 2019 [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Class of Warrant or Right, Number of Securities Called by Warrants or Rights | shares | | | | | | | | | | | | | | | 995,024 | | | | | | | | | | | | | | | | | | | | | | | | | |
Class of Warrant or Right, Exercise Price of Warrants or Rights | $ / shares | | | | | | | | | | | | | | | $ 5.02 | | | | | | | | | | | | | | | | | | | | | | | | | |
Warrants and Rights Outstanding, Term | | | | | | | | | | | | | | | 2 years | | | | | | | | | | | | | | | | | | | | | | | | | |
Subsequent Event [Member] | Other Non-affiliated Investors [Member] | Rule 144A Convertible Notes [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Repayments of Debt | | | | | | | | | | | | | | | | | | | $ 37,900,000 | | | | | | | | | | | | | | | | | | | | | |
Debt Conversion, Original Debt, Amount | | | | | | | | | | | | | $ 13,500,000 | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Debt Conversion, Converted Instrument, Shares Issued | shares | | | | | | | | | | | | | 3,479,008 | 3,479,008 | | | | | | | | | | | | | | | | | | | | | | | | | | |
Subsequent Event [Member] | Vivo Capital LLC [Member] | Private Placement [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Stock Issued During Period, Shares, New Issues | shares | | | | | | | | | | | | | | | | | 913,529 | | | | | | | | | | | | | | | | | | | | | | | |
Shares Issued, Price Per Share | $ / shares | | | | | | | | | | | | | | | | | $ 4.76 | | | | | | | | | | | | | | | | | | | | | | | |
Subsequent Event [Member] | Vivo Capital LLC [Member] | Private Placement April 29, 2019 [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Class of Warrant or Right, Number of Securities Called by Warrants or Rights | shares | | | | | | | | | | | | | | | | | 1,212,787 | | | | | | | | | | | | | | | | | | | | | | | |
Class of Warrant or Right, Exercise Price of Warrants or Rights | $ / shares | | | | | | | | | | | | | | | | | $ 4.76 | | | | | | | | | | | | | | | | | | | | | | | |
Warrants and Rights Outstanding, Term | | | | | | | | | | | | | | | | | 2 years | | | | | | | | | | | | | | | | | | | | | | | |
Subsequent Event [Member] | DSM International B.V. [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Consideration Transferred | | | | | | | | | | | | | | | | | | | 57,000,000 | | | | | | | | | | | | | | | | | | | | | |
Consideration Transferred, Cash Amount | | | | | | | | | | | | | | | | | | | 29,100,000 | | | | | | | | | | | | | | | | | | | | | |
Extinguishment of Debt, Amount | | | | | | | | | | | | | | | | | | | $ 27,900,000 | | | | | | | | | | | | | | | | | | | | | |
Subsequent Event [Member] | Maxwell (Mauritius) Pte Ltd [Member] | Rule 144A Convertible Notes [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Debt Conversion, Original Debt, Amount | | | | | | | | | | | $ 10,000,000 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Debt Conversion, Converted Instrument, Shares Issued | shares | | | | | | | | | | | 2,500,000 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Subsequent Event [Member] | Total [Member] | Rule 144A Convertible Notes [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Debt Instrument, Interest Rate, Stated Percentage | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 10.50% | | | | | | | |
Debt Conversion, Original Debt, Amount | | | | | | | | | | | $ 9,700,000 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Subsequent Event [Member] | Nikko [Member] | Nikko Loan Agreement [Member] | Aprinnova JV [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
First Priority Lien on Interests Owned by the Company | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 12.80% | | | | | | | | |
Subsequent Event [Member] | Nikko [Member] | Nikko Loan Agreement, First Installment [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Proceeds from Issuance of Long-term Debt, Withheld as Prepayment of Interest Payable | | | | | | $ 200,000 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Subsequent Event [Member] | Nikko [Member] | Nikko Loan Agreement, Second Installment [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Proceeds from Issuance of Long-term Debt, Withheld as Prepayment of Interest Payable | | | | | $ 100,000 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Subsequent Event [Member] | The Cannabinoid Agreement [Member] | Lavvan [Member] | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Agreement Amount | | | | | | | | | | | | | | | | $ 300,000,000 | | | | | | | | | | | | | | | | | | | | | | | | |
Agreement, Amount of Research and Development Funding that Could Be Received | | | | | | | | | | | | | | | | $ 300,000,000 | | | | | | | | | | | | | | | | | | | | | | | | |
Agreement, Profit Sharing to Be Received from the Counterparty, Period | | | | | | | | | | | | | | | | 20 years | | | | | | | | | | | | | | | | | | | | | | | | |