Summary of Significant Accounting Policies | Summary of Significant Accounting Policies Basis of Presentation The Company's consolidated financial statements have been prepared in accordance with accounting principles generally accepted in the United States ("U.S. GAAP"). The consolidated financial statements include the accounts of the Company and its wholly-owned subsidiary, which was created in 2019 to process certain administrative functions associated with the business combination in Note 4, Business Combination. All intercompany accounts and transactions have been eliminated in consolidation. Certain amounts have been reclassified on the consolidated statements of operations for presentation purposes. Use of Estimates The preparation of financial statements in conformity with U.S. GAAP requires management to make estimates and assumptions that affect the reported amounts of assets and liabilities and disclosure of contingent assets and liabilities as of the date of the financial statements and the reported amounts of revenue and expenses during the reporting period. Significant items subject to such estimates include: revenue recognition; the useful lives of property and equipment; the recoverability of long-lived assets; the estimation of the fair value of intangible assets; stock options; income tax uncertainties, including a valuation allowance for deferred tax assets; and contingencies. The Company bases these estimates on historical and anticipated results, trends, and various other assumptions that the Company believes are reasonable under the circumstances, including assumptions as to future events. These estimates form the basis for making judgments about the carrying values of assets and liabilities and recognized revenue and expenses that are not readily apparent from other sources. Actual results could differ from those estimates and assumptions. Liquidity The Company has incurred net losses since its inception and as of December 31, 2019 , the Company had an accumulated deficit of $246.7 million . The Company believes its cash and cash equivalents of $159.3 million as of December 31, 2019 and its revenue from sales in 2020 will be sufficient to meet its anticipated cash requirements through at least February 2021. On May 7, 2019, the Company issued and sold 6,325,000 shares of common stock in a registered public offering, including 825,000 shares issued and sold upon the underwriters’ exercise in full of their option to purchase additional shares, at a price to the public of $23.25 per share. The Company's net proceeds from the offering were approximately $137.8 million , after deducting underwriting discounts and commissions and offering expenses of $9.2 million . In July 2018, the Company issued and sold 5,750,000 shares of common stock in a registered public offering, including 750,000 shares issued and sold upon the underwriters' exercise in full of their option to purchase additional shares, at a price to the public of $10.25 per share. The Company's net proceeds from the offering were approximately $55.0 million , after deducting underwriting commissions and offering expenses of $3.9 million . In November 2017, the Company entered into a Loan and Security Agreement and drew down a term loan advance of $25.0 million of which the entire amount was used to pay the outstanding balance of the Company's previous long-term debt as discussed in Note 8 - Debt. If the Company is not able to generate cash proceeds from revenue sufficient to satisfy its cash obligations, the Company will need to finance future cash needs primarily through public or private equity offerings, debt financings, borrowings or strategic collaborations or licensing arrangements. If the Company is not able to secure additional funding when needed, on acceptable terms, it may have to delay, reduce the scope of or eliminate one or more research and development programs or selling and marketing initiatives which may have a material adverse effect on the Company's business, results of operations, financial condition and/or its ability to fund its scheduled obligations on a timely basis or at all. Concentrations of Credit Risk and Other Risks and Uncertainties The majority of the Company's cash and cash equivalents are deposited with one major financial institution in the United States. Deposits in this institution may exceed the amount of insurance provided on such deposits. The Company has not experienced any losses on its deposits of cash and cash equivalents. Several of the components of the Company's sample collection kit and test reagents, and its nCounter FLEX DX systems and related test kits are obtained from single-source suppliers. If these single-source suppliers fail to satisfy the Company's requirements on a timely basis, it could suffer delays in being able to deliver its diagnostic solutions, a possible loss of revenue, or incur higher costs, any of which could adversely affect its operating results. The Company is also subject to credit risk from its accounts receivable related to its sales. The Company does not perform evaluations of customers' financial condition and does not require collateral. Through December 31, 2019 , most of the Company's revenue have been derived from the sale of Afirma. To date, Afirma has been delivered primarily to physicians in the United States. The Company's third-party payers and other customers in excess of 10% of revenue and their related revenue as a percentage of total revenue were as follows: Year Ended December 31, 2019 2018 2017 Medicare 26 % 29 % 26 % UnitedHealthcare 11 % 12 % 14 % 37 % 41 % 40 % The Company's significant third-party payers and other customers in excess of 10% of accounts receivable and their related accounts receivable balance as a percentage of total accounts receivable were as follows: As of December 31, 2019 2018 Medicare 15 % 20 % Johnson and Johnson Services, Inc. 10 % — % UnitedHealthcare 9 % 11 % Cash Equivalents Cash equivalents consist of short-term, highly liquid investments with original maturities of three months or less from the date of purchase. Cash equivalents consist of amounts invested in a money market account primarily consisting of U.S. Treasury reserves, and overnight reverse repurchase agreements which are tri-party repurchase agreements and are collateralized by U.S. Treasury and agency securities of at least 102% of the principal amount. In a tri-party repurchase agreement, a third-party custodian bank functions as an independent intermediary to facilitate transfer of cash and holding the collateral on behalf of the underlying investor for the term of the agreement thereby minimizing risk and exposure to both parties. These overnight reverse repurchase agreements are included within cash equivalents due to their high liquidity and relatively low risk. Restricted Cash The Company had deposits of $603,000 included in long-term assets as of December 31, 2019 and December 31, 2018 , restricted from withdrawal and held by a bank in the form of collateral for an irrevocable standby letter of credit held as security for the lease of the Company's South San Francisco facility. Acquisitions The Company first determines whether a set of assets acquired and liabilities assumed constitute a business and should be accounted for as a business combination. If the assets acquired are not a business, the Company accounts for the transaction as an asset acquisition. Business combinations are accounted for by using the acquisition method of accounting. Under the acquisition method, assets acquired, and liabilities assumed are recorded at their respective fair values as of the acquisition date in our consolidated financial statements. The excess of the fair value of consideration transferred over the fair value of the net assets acquired is recorded as goodwill. Contingent consideration obligations incurred in connection with a business combination are recorded at fair value on the acquisition date and remeasured at each subsequent reporting period until the related contingencies are resolved, with the resulting changes in fair value recorded in earnings. Accounts Receivable and Allowance for Doubtful Accounts for Product Sales Accounts receivable are stated at the amount management expects to collect from customers based on their outstanding invoices. Management reviews accounts receivable regularly to determine if any receivable will potentially be uncollectible and to estimate the amount of allowance for doubtful accounts necessary to reduce accounts receivable to its estimated net realizable value by analyzing the status of significant past due receivables. Product sales commenced in December 2019 and there was no allowance for doubtful accounts at either December 31, 2019 or 2018. Property and Equipment Property and equipment are stated at cost less accumulated depreciation and amortization. Depreciation is computed using the straight-line method over the estimated useful lives of the assets, generally between three and five years . Leasehold improvements are amortized using the straight-line method over the shorter of the estimated useful life of the asset or the term of the lease. Maintenance and repairs are charged to expense as incurred, and improvements and betterments are capitalized. When assets are retired or otherwise disposed of, the cost and accumulated depreciation are removed from the balance sheet and any resulting gain or loss is reflected in the statements of operations and comprehensive loss in the period realized. Finite-lived Intangible Assets Finite-lived intangible assets consist of intangible assets acquired as part of business combinations. The Company amortizes finite-lived intangible assets using the straight-line method over their estimated useful lives of 5 to 15 years , based on management's estimate of the period over which their economic benefits will be realized, product life and patent life. The Company tests these finite-lived intangible assets for impairment when events or circumstances indicate a reduction in the fair value below their carrying amounts. There was no impairment for the years ended December 31, 2019 , 2018 or 2017 . Goodwill Goodwill, derived from the Company's acquisition of Allegro Diagnostics Corp. in September 2014 and the exclusive global diagnostics license to the NanoString nCounter FLEX Analysis System and Prosigna and LymphMark assays in December 2019, is reviewed for impairment on an annual basis or more frequently if events or circumstances indicate that it may be impaired. The Company's goodwill evaluation is done annually on October 31 and is based on both qualitative and quantitative assessments regarding the fair value of goodwill relative to its carrying value. The Company has determined that it operates in a single segment and has a single reporting unit associated with the development and commercialization of diagnostic products. In the event the Company determines that it is more likely than not the carrying value of the reporting unit is higher than its fair value, quantitative testing is performed comparing recorded values to estimated fair values. If impairment is present, the impairment loss is measured as the excess of the recorded goodwill over its implied fair value. There was no impairment for the years ended December 31, 2019 , 2018 or 2017 . Fair Value of Financial Instruments The carrying amounts of certain financial instruments including cash and cash equivalents, accounts receivable, prepaid expenses and other current assets, accounts payable and accrued liabilities approximate fair value due to their relatively short maturities. See Note 6, "Fair Value Measurements" for further information on the fair value of the Company’s financial instruments. Revenue Recognition Testing Revenue The Company commenced recognizing testing revenue in accordance with the provisions of ASC 606, Revenue from Contracts with Customers , or ASC 606, starting January 1, 2018. Prior to January 1, 2018, the Company recognized testing revenue in accordance with the provisions of ASC 954-605, Health Care Entities - Revenue Recognition , or ASC 954. Most of the Company’s revenue is generated from the provision of testing services. These services are completed upon the delivery of test results to the prescribing physician, at which time the Company bills for the services. The Company recognizes revenue related to billings based on estimates of the amount that will ultimately be realized. In determining the amount to accrue for a delivered test, the Company considers factors such as payment history, payer coverage, whether there is a reimbursement contract between the payer and the Company, payment as a percentage of agreed upon rate (if applicable), amount paid per test and any current developments or changes that could impact reimbursement. These estimates require significant judgment by management. The Company adopted ASC 606 on January 1, 2018 using the modified retrospective method, which requires a cumulative catch-up adjustment as if the Company had recognized revenue under ASC 606 from January 1, 2016. Prior to January 1, 2018, the Company recognized revenue in accordance with ASC 954 and recognized revenue for tests delivered on an accrual basis when amounts that will ultimately be realized could be reasonably estimated, and on the cash basis when there was insufficient information to estimate revenue accruals. There was sufficient payment history for the Company to substantially accrue all revenue upon delivery of test results starting July 1, 2016 and the Company continued to recognize revenue in 2017 upon cash receipt for unaccrued tests that were delivered prior to July 1, 2016. Testing revenue recognized for the years ended December 31, 2019 , 2018 and 2017 was as follows (in thousands of dollars): Year Ended December 31, 2019 2018 2017 Testing revenue recognized on the accrual basis $ 107,355 100 % $ 91,058 100 % $ 69,274 96 % Testing revenue recognized on the cash basis — — % — — % 2,679 4 % Total $ 107,355 100 % $ 91,058 100 % $ 71,953 100 % As noted above, on July 1, 2016 the Company began recognizing testing revenue from substantially all its tests on the accrual basis of accounting at an amount equal to management’s best estimate of the cash to ultimately be collected. For tests delivered prior to July 1, 2016, substantially all the related cash had been collected by December 31, 2017. Thus, at January 1, 2018, the cumulative impact of adopting ASC 606 was not material and no adjustment was recorded. Since the Company commenced recognizing revenue from substantially all of its tests on the accrual basis of accounting commencing on July 1, 2016, and continued to do so after the adoption of ASC 606, the adoption of ASC 606 did not have a material impact on the Company's statement of operations for the year ended December 31, 2019 . During 2019, the Company changed its testing revenue estimates due to actual and anticipated cash collections for tests delivered in 2018 or prior years and recognized additional revenue of $1.6 million , which resulted in a decrease in the Company's loss from operations of $1.6 million and a decrease in loss per share of $0.04 for the year ended December 31, 2019 . During 2018, the Company changed its testing revenue estimates due to actual and anticipated cash collections for tests delivered in 2017 or prior years and recognized additional revenue of $1.4 million , which resulted in a decrease in the Company's loss from operations of $1.4 million and a decrease in loss per share of $0.04 for the year ended December 31, 2018. Product Revenue The Company began recognizing product revenue in December 2019, when the Company executed an agreement with NanoString for the exclusive global license to the nCounter platform for diagnostic use. More details on this agreement are in Note 4 - Business Combination. Product revenue from instruments, consumables and in vitro diagnostic kits is recognized generally upon shipment or when the instrument is ready for use by the end customer, which is when title of the product has been transferred to the customer. This process involves identifying the contract with a customer, determining the performance obligations in the contract, determining the contract price, allocating the contract price to the distinct performance obligations in the contract, and recognizing revenue when the performance obligations have been satisfied. A performance obligation is considered distinct from other obligations in a contract when it provides a benefit to the customer either on its own or together with other resources that are readily available to the customer and is separately identified in the contract. Performance obligations are considered satisfied once the Company has transferred control of a product to the customer, meaning the customer has the ability to use and obtain the benefit of the product. The Company recognizes product revenue for satisfied performance obligations only when there are no uncertainties regarding payment terms or transfer of control. Shipping and handling costs incurred for product shipments are charged to the Company's customers and included in product revenue. Revenues are presented net of the taxes that are collected from customers and remitted to governmental authorities. There was no revenue from instrument sales for the years ended December 31, 2019, 2018 or 2017. Biopharmaceutical and Collaboration Revenue From time to time, the Company enters into arrangements for research and development and/or commercialization services. Such arrangements may require the Company to deliver various rights, services and/or samples, including intellectual property rights/licenses, R&D services, and/or commercialization services. The underlying terms of these arrangements generally provide for consideration to the Company in the form of nonrefundable upfront license fees, development and commercial performance milestone payments, royalty payments, and/or profit sharing. In arrangements involving more than one performance obligation, each required performance obligation is evaluated to determine whether it qualifies as a distinct performance obligation based on whether (i) the customer can benefit from the good or service either on its own or together with other resources that are readily available and (ii) the good or service is separately identifiable from other promises in the contract. The consideration under the arrangement is then allocated to each separate distinct performance obligation based on its respective relative stand-alone selling price. The estimated selling price of each deliverable reflects the Company's best estimate of what the selling price would be if the deliverable was regularly sold by the Company on a stand-alone basis or using an adjusted market assessment approach if selling price on a stand-alone basis is not available. The consideration allocated to each distinct performance obligation is recognized as revenue when control of the related goods is transferred or services are performed. Consideration associated with at-risk substantive performance milestones is recognized as revenue when it is probable that a significant reversal of the cumulative revenue recognized will not occur. Should there be royalties, the Company utilizes the sales and usage-based royalty exception in arrangements that resulted from the license of intellectual property, recognizing revenues generated from royalties or profit sharing as the underlying sales occur. Collaborative Arrangements The Company enters into collaborative arrangements with partners that fall under the scope of ASC Topic 808, Collaborative Arrangements (“ASC 808”). While these arrangements are in the scope of ASC 808, the Company may analogize to ASC 606 for some aspects of these arrangements. The Company analogizes to ASC 606 for certain activities within the collaborative arrangement for the delivery of a good or service (i.e., a unit of account) that is part of its ongoing major or central operations. The terms of the Company’s collaborative arrangements typically include one or more of the following: (i) up-front fees; (ii) milestone payments related to the achievement of development, regulatory, or commercial goals; and (iii) royalties on net sales of licensed products. Each of these payments may result in collaboration revenues or an offset against research and development expense. Net sales of data or other services to our customers are classified under biopharmaceutical revenue and collaboration revenue, such as milestones, are classified under collaboration revenue in our consolidated statements of operations and comprehensive loss. As part of the accounting for these arrangements, the Company must develop estimates and assumptions that require judgment to determine the underlying stand-alone selling price for each performance obligation which determines how the transaction price is allocated among the performance obligations. Generally, the estimation of the stand-alone selling price may include such estimates as independent evidence of market price, forecasted revenues or costs, development timelines, discount rates, and probabilities of technical and regulatory success. The Company evaluates each performance obligation to determine if they can be satisfied at a point in time or over time, and it measures the services delivered to the collaborative partner which are periodically reviewed based on the progress of the related program. The effect of any change made to an estimated input component and, therefore revenue or expense recognized, would be recorded as a change in estimate. In addition, variable consideration (e.g., milestone payments) must be evaluated to determine if it is constrained and, therefore, excluded from the transaction price. Up-front Fees: If a license to the Company’s intellectual property is determined to be distinct from the other performance obligations identified in the arrangement, the Company recognizes revenues from the transaction price allocated to the license when the license is transferred to the licensee and the licensee is able to use and benefit from the license. For licenses that are bundled with other promises, the Company utilizes judgment to assess the nature of the combined performance obligation to determine whether the combined performance obligation is satisfied over time or at a point in time. Milestone Payments: At the inception of each arrangement that includes milestone payments (variable consideration), the Company evaluates whether the milestones are considered probable of being reached and estimates the amount to be included in the transaction price using the most likely amount method. If it is probable that a significant revenue reversal would not occur, the associated milestone value is included in the transaction price. Milestone payments that are not within the Company’s or the collaborative partner’s control, such as non-operational developmental and regulatory approvals, are generally not considered probable of being achieved until those approvals are received. At the end of each reporting period, the Company re-evaluates the probability of achievement of milestones that are within its or the collaborative partner’s control, such as operational developmental milestones and any related constraint, and if necessary, adjusts its estimate of the overall transaction price. Any such adjustments are recorded on a cumulative catch-up basis, which would affect collaboration revenues and earnings in the period of adjustment. Revisions to the Company’s estimate of the transaction price may also result in negative collaboration revenues and earnings in the period of adjustment. Services Agreement with Loxo Oncology On April 9, 2018, the Company entered into an agreement with Loxo Oncology, Inc. ("Loxo") whereby the Company agreed to provide certain tissue samples and other services in exchange for agreed-upon fees. During the quarter ended June 30, 2018, the Company recognized $450,000 of revenue upon deliveries of tissue samples and the Company received $500,000 for other services, which was recognized ratably during the quarters ended September 30 and December 31, 2018 as the services were performed. Thereafter, the Company expects to receive approximately $250,000 per quarter as services are performed and may also recognize revenue related to the deliveries of additional tissue samples as long as the agreement is not terminated. The agreement has a one -year term with an automatic renewal of one year and Loxo may terminate the agreement at any time with at least 90 days' notice. As of December 31, 2019, the agreement had not been terminated. The Company evaluated the accounting for this agreement under ASC 606 and concluded that the performance obligations thereunder are the deliveries of tissue samples and performance of services, both of which are distinct. For the year ended December 31, 2019 , the Company recognized revenue of $90,000 for deliveries of tissue samples and $1,000,000 for the performance of services and is classified under biopharmaceutical revenue in the Consolidated Statement of Operations and Comprehensive Loss. There was no deferred revenue related to this agreement at December 31, 2019 . Diagnostic Development Agreement with Johnson & Johnson On December 28, 2018, the Company entered into a diagnostics development agreement with Johnson and Johnson Services, Inc. ("JJSI") (i) to cooperate on a program to enable the Company to use JJSI samples and clinical data to develop a next generation bronchial genomic classifier diagnostic for lung cancer diagnosis (“Percepta v.2") and a nasal genomic classifier diagnostic for lung cancer (“NasaRISK”) and (ii) for JJSI to use Veracyte data generated in two Veracyte development programs for therapeutic purposes and for purposes of developing a companion diagnostic product used in conjunction with a JJSI therapeutic. The Company granted a license to JJSI with the right to use data and under the Company's intellectual property rights for JJSI's therapeutic purposes, including the development and commercialization of a companion diagnostic for its products, from the Percepta v.2 and NasaRISK programs. The license granted to JJSI is not distinct from other performance obligations as JJSI receives benefit only when other performance obligations are met. Under the terms of the agreement, the Company will provide data from its RNA whole-transcriptome sequencing platform to JJSI in exchange for $7.0 million in payments from JJSI. The Company is also entitled to additional payments from JJSI of up to $13.0 million , conditioned upon the achievement of certain milestones relating to the development and reimbursement of Percepta v.2 and NasaRISK. For a period of ten years commencing with the first commercial sale of Percepta v.2 and NasaRISK, respectively, the Company will make payments to JJSI of one percent of net cash collections for Percepta v.2 and in the low-single digits of net cash collections for NasaRISK, depending on the number and timing of JJSI samples and associated clinical data the Company receives from JJSI. The JJSI agreement is considered to be within the scope of ASC 808, as the parties are active participants and exposed to the risks and rewards of the collaborative activity. The Company evaluated the terms of the JJSI agreement and has analogized to ASC 606 for the delivery of data from its RNA whole-transcriptome sequencing platform to JJSI under the collaborative arrangement, which the Company believes is a distinct service for which JJSI meets the definition of a customer. Using the concepts of ASC 606, the Company has identified the delivery of data as its only performance obligation. The Company further determined that the transaction price under the arrangement was the $7.0 million in payments which was allocated to the obligation to deliver data. The $13.0 million in future potential payments is considered variable consideration because the Company determined that the potential payments are contingent upon regulatory and commercialization milestones that are uncertain to occur and, as such, were not included in the transaction price, and will be recognized accordingly as each potential payment becomes probable. The Company recognized revenue of $7.0 million and $4.0 million during 2019 for the provision of data and fulfillment of obligations relating to Percepta v.2 and NasaRISK development milestones, respectively. This revenue is classified under biopharmaceutical revenue and collaboration revenue, respectively, in the consolidated statement of operations and comprehensive loss. Accounts receivable from JJSI was $2.0 million at December 31, 2019 . The cost of biopharmaceutical revenue recognized under the agreement with JJSI is not significant and recorded in research and development in the statement of operations and comprehensive loss. There was no deferred revenue related to this agreement at December 31, 2019 . Collaboration Agreement with AstraZeneca Group On December 23, 2019, the Company entered into an agreement with Acerta Pharma B.V. ("Acerta"), a member of AstraZeneca Group whereby the Company agreed to provide genomic information that will support Acerta’s development of oncology therapeutics. Acerta will reimburse the Company for certain development costs and pay milestones to the Company for the achievement of development milestones. As of December 31, 2019, there was no performance of obligations under the agreement or consideration paid. The agreement will be accounted for in accordance with the policy on collaborative arrangements, as mentioned in this footnote. Cost of Testing Revenue The components of our cost of testing services are laboratory expenses, sample collection expenses, compensation expense, license fees and royalties, depreciation and amortization, other expenses such as equipment and laboratory supplies, and allocations of facility and information technology expenses. Costs associated with performing tests are expensed as the test is processed regardless of whether and when revenue is recognized with respect to that test. Cost of Product Revenue Cost of product revenue consists primarily of costs of purchasing instruments and consumables from third-party contract manufacturers, installation, warranty, service and packaging and delivery costs. In addition, cost of product includes royalty costs for licensed technologies included in the Company’s products and labor expenses. Cost of product revenue for instruments and consumables is recognized in the period the related revenue is recognized. Shipping and handling costs incurred for product shipments are included in cost of product in the consolidated statements of operations. Research and Development Research and development expenses include expenses incurred to develop our technology, collect clinical samples and conduct clinical studies to develop and support our products. These expenses consist of compensation expenses, direct research and development expenses such as prototype materials, laboratory supplies and costs associated with setting up and conducting clinical studies at domestic and international sites, professional fees, depreciation and amortization, other miscellaneous expenses and allocation of facility and information technology expenses. We expense all research and development costs in the periods in which they are incurred. Income Taxes The Company accounts for income taxes under the liability method. Under this method, deferred tax assets and liabilities are determined based on the difference between the financial statement and tax bases of assets and liabilities using enacted tax rates in effect for the year in which the differences are expected to affect taxable income. Valuation allowances are established when necessary to reduce deferred tax assets to the amounts expected to be realized. The Company assesses all material positions taken in any income tax return, including all significant uncertain positions, in all tax years that are still subject to assessment or challenge by relevant taxing authorities. The Company's assessment of an uncertain tax position begins with the initial determination of the position's sustainability and is measured at the largest amount of benefit that is more-likely-than-not of being realized upon ultimate settlement. As of each balance sheet date, unresolved uncertain tax positions must be reassessed, and the Company will determine whether (i) the factors underlying the sustainability assertion have changed and (ii) the amount of the |