Collaboration and license agreements - Additional Information (Detail) - USD ($) | 1 Months Ended | 3 Months Ended | 8 Months Ended | 12 Months Ended |
Dec. 31, 2016 | Dec. 31, 2014 | Mar. 31, 2017 | Mar. 31, 2016 | Dec. 31, 2017 | Dec. 31, 2017 | Dec. 31, 2014 |
Research and Development Arrangement, Contract to Perform for Others [Line Items] | | | | | | | |
Development costs | | | $ 32,735,033 | $ 18,251,900 | | | |
Current portion of deferred revenue | $ 5,168,674 | | 5,168,674 | | | | |
Long-term deferred revenue | 3,865,885 | | 2,591,418 | | | | |
Milestone payment, additional revenue potential to be earned | | | $ 230,000,000 | | | | |
Pfizer Collaboration and License Agreement [Member] | | | | | | | |
Research and Development Arrangement, Contract to Perform for Others [Line Items] | | | | | | | |
Collaborative arrangement rights and obligations | | | Under the agreement, the Company granted Pfizer an exclusive worldwide license to any Factor IX gene therapy that it develops, manufactures or commercializes prior to December 31, 2024. | | | | |
Development costs | | | | | | | $ 10,600,000 |
Upfront payment received for license | | $ 20,000,000 | | | | | |
Licenses revenue | | | $ 1,300,000 | 1,300,000 | | | |
Current portion of deferred revenue | | | 5,200,000 | | | | |
Long-term deferred revenue | | | $ 2,600,000 | | | | |
Collaboration agreement expiration, period | | | 15 years | | | | |
Collaboration and license agreement expiration description | | | The agreement will expire on a country-by-country basis upon the latest of: (i) the expiration of the last-to-expire valid claim, as defined in the agreement, in licensed patent rights covering a licensed product; (ii) the expiration of the last-to-expire regulatory exclusivity granted with respect to a licensed product or; (iii) 15 years after the first commercial sale of the last licensed product to be launched, in each case, in the applicable country. Pfizer may terminate the agreement on a licensed product-by-licensed product and country-by-country basis, or in its entirety, for any or no reason subject to notice requirements. | | | | |
First Product Candidate [Member] | | | | | | | |
Research and Development Arrangement, Contract to Perform for Others [Line Items] | | | | | | | |
Milestone payment, additional revenue potential to be earned | | | $ 110,000,000 | | | | |
Additional Product Candidates [Member] | | | | | | | |
Research and Development Arrangement, Contract to Perform for Others [Line Items] | | | | | | | |
Milestone payment, additional revenue potential to be earned | | | 120,000,000 | | | | |
Selecta License Agreement [Member] | | | | | | | |
Research and Development Arrangement, Contract to Perform for Others [Line Items] | | | | | | | |
Prepaid expense, current | $ 10,000,000 | | | | | | |
Shares purchased (in shares) | 197,238 | | | | | | |
Investment shares purchased, amount | $ 5,000,000 | | | | | | |
Payments to acquire project | | | 15,000,000 | | | | |
Payments to acquire in process research and development | | | 11,500,000 | | | | |
Development and Regulatory Milestone [Member] | | | | | | | |
Research and Development Arrangement, Contract to Perform for Others [Line Items] | | | | | | | |
Collaboration agreement expiration, period | 90 days | | | | | | |
Milestone payments | $ 65,000,000 | | | | | | |
Milestone payment, option period | 3 years | | | | | | |
Commercial Milestone [Member] | | | | | | | |
Research and Development Arrangement, Contract to Perform for Others [Line Items] | | | | | | | |
Milestone payments | $ 365,000,000 | | | | | | |
Research and Development Expense [Member] | Pfizer Collaboration and License Agreement [Member] | | | | | | | |
Research and Development Arrangement, Contract to Perform for Others [Line Items] | | | | | | | |
Reimbursed costs | | | 1,000,000 | $ 300,000 | | | |
Minimum [Member] | Selecta License Agreement [Member] | | | | | | | |
Research and Development Arrangement, Contract to Perform for Others [Line Items] | | | | | | | |
Option exercise fee | 1,400,000 | | | | | | |
Maximum [Member] | Selecta License Agreement [Member] | | | | | | | |
Research and Development Arrangement, Contract to Perform for Others [Line Items] | | | | | | | |
Option exercise fee | 2,000,000 | | | | | | |
Milestone payments | $ 430,000,000 | | | | | | |
Milestone payment, rights to fund percentage | 50.00% | | | | | | |
Scenario, Forecast [Member] | Selecta License Agreement [Member] | | | | | | | |
Research and Development Arrangement, Contract to Perform for Others [Line Items] | | | | | | | |
Prepaid expense, current | | | | | | $ 5,000,000 | |
Investment shares purchased, amount | | | | | $ 10,000,000 | | |
Common Stock [Member] | Selecta License Agreement [Member] | | | | | | | |
Research and Development Arrangement, Contract to Perform for Others [Line Items] | | | | | | | |
Payments to acquire project | | | 3,500,000 | | | | |
Licensing Agreements [Member] | Selecta License Agreement [Member] | | | | | | | |
Research and Development Arrangement, Contract to Perform for Others [Line Items] | | | | | | | |
Payments to acquire project | | | $ 11,500,000 | | | | |