Revenue Arrangements - Narrative (Details)
1 Months Ended 3 Months Ended 12 Months Ended
Oct. 01, 2021
USD ($)
Jul. 28, 2020
USD ($)
Jun. 13, 2020
USD ($)
Jun. 11, 2020
USD ($)
obligation
shares
Dec. 17, 2019
USD ($)
Dec. 02, 2016
USD ($)
Sep. 30, 2020
USD ($)
Dec. 31, 2016
USD ($)
shares
Dec. 31, 2021
USD ($)
Jun. 30, 2021
USD ($)
Dec. 31, 2021
USD ($)
Dec. 31, 2020
USD ($)
amendment
Dec. 31, 2019
USD ($)
Oct. 31, 2017
USD ($)
shares
Jun. 08, 2017
USD ($)
shares
Disaggregation of Revenue [Line Items]                              
Short-term contract liability                 $ 53,883,000   $ 53,883,000 $ 72,050,000      
Long-term contract liability                 11,417,000   11,417,000 38,746,000      
Revenue recognized                     51,496,000        
Contract assets amortization (less than)                     700,000        
Accounts receivable                 9,914,000   9,914,000 7,224,000      
Grant and collaboration revenue (less than)                     85,077,000 16,597,000 $ 6,677,000    
Deferred revenue related to agreement                 65,300,000   65,300,000 110,796,000      
Remaining performance obligation                 65,300,000   65,300,000        
Grant Revenue                              
Disaggregation of Revenue [Line Items]                              
Grant and collaboration revenue (less than)                         $ 100,000    
SOBI Purchase Agreement                              
Disaggregation of Revenue [Line Items]                              
Short-term contract liability                 37,500,000   37,500,000 68,300,000      
Long-term contract liability                 5,100,000   5,100,000 24,200,000      
Revenue recognized                 83,500,000   16,600,000        
Sale common stock       $ 25,000,000                      
Redemption premium   $ 14,500,000                          
Contract assets                 700,000   700,000        
Accounts receivable                 9,900,000   9,900,000 6,900,000      
Sale of stock, number of shares issued in transaction (in shares) | shares       5,416,390                      
SOBI Purchase Agreement | Prepaid Expenses and Other Current Assets                              
Disaggregation of Revenue [Line Items]                              
Contract assets                 600,000   600,000        
SOBI Purchase Agreement | Other Current Assets                              
Disaggregation of Revenue [Line Items]                              
Contract assets                 100,000   100,000        
Sarepta Therapeutics, Inc.                              
Disaggregation of Revenue [Line Items]                              
Upfront cash payment     $ 2,000,000                        
Short-term contract liability                 4,600,000   4,600,000 $ 2,000,000.0      
Revenue recognized                     400,000        
Sales milestone payments                   $ 3,000,000          
License and option agreement, written day notice period before cancellation     30 days                        
Option term     24 months                        
Number of amendments | amendment                       2      
License Agreement For Pompe Disease                              
Disaggregation of Revenue [Line Items]                              
Upfront cash payment         $ 7,000,000                    
Short-term contract liability                 1,700,000   1,700,000        
Long-term contract liability                       $ 5,300,000      
Revenue recognized                     0 0      
Sales milestone payments         $ 237,000,000                    
Period after first commercial sale when the Company is eligible to receive royalties         10 years                    
Initial up-front cash payment         $ 2,000,000                    
Initial upfront execution fee payment         $ 5,000,000                    
Spark License Agreement                              
Disaggregation of Revenue [Line Items]                              
Upfront cash payment           $ 15,000,000                  
Sale common stock               $ 15,000,000              
Sale of stock, number of shares issued in transaction (in shares) | shares               197,238              
Two payments due within 12 months of contract date           2,500,000                  
Additional development and regulatory milestone payments           1,200,000                  
Commercialization milestone payments           $ 6,700,000                  
Deferred revenue related to agreement                 9,200,000   9,200,000 9,200,000      
First Acquisition Right                              
Disaggregation of Revenue [Line Items]                              
Aggregate purchase price               $ 5,000,000           $ 5,000,000 $ 5,000,000
Skolkovo                              
Disaggregation of Revenue [Line Items]                              
Revenue recognized                     100,000        
Takeda Agreement                              
Disaggregation of Revenue [Line Items]                              
Upfront cash payment $ 3,000,000                            
Future additional payments, expected $ 1,124,000,000                            
Short-term contract liability                 1,000,000.0   1,000,000.0        
Long-term contract liability                 $ 1,000,000.0   1,000,000.0        
Revenue recognized                     1,000,000.0        
Collaborative Arrangement                              
Disaggregation of Revenue [Line Items]                              
Upfront cash payment       $ 75,000,000     $ 75,000,000                
Sales milestone payments       $ 630,000,000                      
License and option agreement, written day notice period before cancellation       180 days                      
Period after first commercial sale when the Company is eligible to receive royalties       10 years                      
Number of obligations | obligation       3                      
Development milestone       $ 5,000,000                      
Spark Letter Agreement                              
Disaggregation of Revenue [Line Items]                              
Revenue recognized                     $ 0 $ 0      
Number of shares authorized to be sold (in shares) | shares                           205,254 324,362