<PAGE>

                                                                   EXHIBIT 10.5




                                 VIROLOGIC, INC.

                                      STOCK
                               PURCHASE AGREEMENT


                                NOVEMBER 14, 2002


<PAGE>

                            STOCK PURCHASE AGREEMENT


        THIS STOCK PURCHASE AGREEMENT ("AGREEMENT") is made as of November 14,
2002 (the "EFFECTIVE DATE"), by and between VIROLOGIC, INC., a Delaware
corporation with its principal place of business at 270 East Grand Avenue, South
San Francisco, California 94080 (the "COMPANY"), and PFIZER IRELAND
PHARMACEUTICALS, Pottery Road, Dun Laoghaire, Co. Dublin, Ireland (the
"PURCHASER").

        WHEREAS,

        1. The Company and the Purchaser have agreed to enter into a
relationship where the Company shall provide the Purchaser with certain services
and access to certain technology. As part of that relationship the Parties shall
execute at the same time as this Agreement (i) an agreement to license certain
patent rights and HIV assay technology (the "NON-EXCLUSIVE LICENSE") and (ii) an
agreement for the provision of certain drug evaluation and/or clinical services
(the "MASTER SERVICES AGREEMENT").

        2. Under this Agreement the Company wishes to sell to the Purchaser, and
Purchaser wishes to purchase from the Company, shares of the Company's common
stock, par value $0.001 per share (the "COMMON STOCK"), on the terms and subject
to the conditions set forth in this Agreement.


                                    AGREEMENT

        In consideration of the mutual covenants contained in this Agreement,
and for other good and valuable consideration, the receipt of which is hereby
acknowledged, the Company and the Purchaser hereby agree as follows:

        1. Execution of this Stock Purchase Agreement is contingent upon the
following:

           (a)   simultaneous execution of the Non-Exclusive License

           (b)   simultaneous execution of the Master Services Agreement

           (c)   simultaneous execution of other third party agreements with the
                 express purpose of raising a further US$6MM (the "CAPITAL"), in
                 addition to the US$3MM raised through this Agreement; such
                 Capital to be in the form of other equity investments
                 ("ADDITIONAL SECURITIES"), direct payment of salaried employees
                 and/or bona fide loan agreements other than short term loan
                 arrangements.

        2. AUTHORIZATION OF SALE OF THE SECURITIES; SALES OF ADDITIONAL
SECURITIES. Subject to the terms and conditions of this Agreement, the Company
has authorized the sale and issuance of up to 2,608,695 shares of Common Stock
(the "SECURITIES") at the Closing (as defined below).
<PAGE>

        3. AGREEMENT TO SELL AND PURCHASE THE SECURITIES.

           3.1 At the Closing, the Company will sell to the Purchaser, and the
Purchaser will purchase from the Company, the Securities at a per share purchase
price equal to one hundred and five percent of the average of the closing price
of the Common Stock as reported on the Nasdaq National Market for the 20 trading
days ending on the trading day immediately preceding the Closing Date, for a
total purchase price of three million dollars (the "TOTAL PURCHASE PRICE").

        4. CLOSING AND DELIVERY.

           4.1 CLOSING. The closing of the purchase and sale of the Securities
pursuant to this Agreement (the "CLOSING") shall be held at the offices of
Cooley Godward LLP, 4401 Eastgate Mall, San Diego, California 92121 on the
Effective Date, or on such other date and place as may be agreed to by the
Company and the Purchaser (the "CLOSING DATE"). At or prior to the Closing, the
Purchaser and the Company shall execute any related agreements or other
documents required to be executed hereunder, dated as of the Closing Date.

           4.2 DELIVERY.

               (a) At the Closing, the Company shall deliver to the Purchaser
the stock certificates registered in the name of the Purchaser, and/or in such
nominee name(s) as designated in writing by the Purchaser, representing the
Securities against payment of the Total Purchase Price.

        5. REPRESENTATIONS, WARRANTIES AND COVENANTS OF THE COMPANY.

           Except as set forth on the Schedule of Exceptions delivered to the
Purchaser concurrently herewith, the Company hereby represents and warrants as
of the date hereof to, and covenants with, the Purchaser as follows:

           5.1 ORGANIZATION AND GOOD STANDING. The Company has been duly
incorporated and is validly existing as a corporation in good standing under the
laws of the State of Delaware, has full corporate power and authority to own or
lease its properties and conduct its business as described in the SEC Documents
(as defined in Section 5.5 below), and is duly qualified as a foreign
corporation and in good standing in all jurisdictions in which the character of
the property owned or leased or the nature of the business transacted by it
makes qualification necessary, except where the failure to be so qualified would
not have a material adverse effect on the business, properties, financial
condition or results of operations of the Company.

           5.2 CORPORATE POWER; AUTHORIZATION. The Company has all requisite
corporate power, and has taken all requisite corporate action, to execute and
deliver this Agreement, sell and issue the Securities and carry out and perform
all of its obligations under this Agreement. This Agreement constitutes a legal,
valid and binding obligation of the Company, enforceable in accordance with its
terms, except (i) as limited by applicable bankruptcy, insolvency,
reorganization, moratorium or similar laws relating to or affecting the
enforcement of creditors' rights generally, (ii) as limited by equitable
principles generally, including any specific performance, and (iii) to the
extent that the enforceability of those



                                       2
<PAGE>

provisions of Section 10.7 relating to indemnity or contribution may be limited
by applicable laws.

           5.3 COMPLIANCE WITH OTHER INSTRUMENTS. The execution, delivery and
performance of and compliance with this Agreement and the issuance, sale and
delivery of the Securities by the Company will not result in a material breach
or violation of the terms, conditions or provisions of, (a) the Certificate of
Incorporation or Bylaws of the Company, (b) any statute, law, rule or regulation
(including without limitation, the rules and regulations applicable to the
Nasdaq Stock Market and applicable securities laws) applicable to the Company,
(c) any state or federal order, judgment or decree applicable to the Company or
(d) any indenture, mortgage, lease or other material agreement or instrument to
which the Company or any of its properties is subject, where such breach or
violation would have a material adverse effect on the Company. The execution,
delivery and performance of and compliance with this Agreement and the issuance,
sale and delivery of the Securities by the Company will not require the approval
of its stockholders, or result in the creation or imposition of any lien upon
any of the properties or assets of the Company.

           5.4 VALID ISSUANCE. The Securities, when issued and paid for in
compliance with the provisions of this Agreement, will be validly issued, fully
paid and nonassessable and will not be issued in violation of any preemptive
right that has not been effectively waived.

           5.5 SEC DOCUMENTS; FINANCIAL STATEMENTS. The Company has filed in a
timely manner all documents that the Company was required to file with the
United States Securities and Exchange Commission (the "SEC") under Sections 13,
14(a) and 15(d) of the Securities Exchange Act of 1934, as amended (the
"EXCHANGE ACT"), during the twelve (12) months preceding the Effective Date. As
of their respective filing dates (or, if amended, when amended), all documents
filed by the Company with the SEC (the "SEC DOCUMENTS") complied in all material
respects with the requirements of the Exchange Act. None of the SEC Documents as
of their respective dates contained any untrue statement of material fact or
omitted to state a material fact required (under the federal securities laws in
connection with the sale of the Securities) to be stated therein or necessary to
make the statements made therein, in light of the circumstances under which they
were made, not misleading. The financial statements of the Company included in
the SEC Documents (the "FINANCIAL STATEMENTS") comply as to form and substance
in all material respects with applicable accounting requirements and with the
published rules and regulations of the SEC with respect thereto. The Financial
Statements have been prepared in accordance with generally accepted accounting
principles consistently applied and fairly present the financial position of the
Company at the dates thereof and the results of its operations and cash flows
for the periods then ended (subject, in the case of unaudited statements, to
normal, recurring adjustments).

           5.6 INTELLECTUAL PROPERTY. The Company owns or possesses adequate
rights to use all material patents, patent rights, inventions, trade secrets and
know-how that are necessary for the conduct of its business as presently
conducted and as described in the SEC Documents. Except as set forth in the SEC
Documents, the Company has not received any written notice of, nor has any
knowledge of, any infringement of or conflict with asserted rights of others
with respect to any patent, patent right, invention, trade secret or know-how
that, individually or in the aggregate, if the subject of an unfavorable
decision, ruling or finding,


                                       3
<PAGE>

would have a material adverse effect on the business, properties, financial
condition or results or operations of the Company.

           5.7 CAPITALIZATION. The capitalization of the Company is as described
in the Company's SEC Documents. The Company has not issued any capital stock
since June 30, 2002 other than pursuant to employee benefit plans disclosed in
the Company's SEC Documents. The outstanding shares of capital stock of the
Company have been duly and validly issued and are fully paid and nonassessable
and were not issued in violation of any preemptive rights not effectively
waived. Except as set forth in or contemplated by the Company's SEC Documents or
as otherwise described in this Agreement, there are no outstanding rights
(including, without limitation, preemptive rights), warrants or options to
acquire, or instruments convertible into or exchangeable for, any unissued
shares of capital stock or other equity interest in the Company, or any
contract, commitment, agreement, understanding or arrangement of any kind to
which the Company is a party and relating to the issuance or sale of any capital
stock of the Company, any such convertible or exchangeable securities or any
such rights, warrants or options.

           5.8 LITIGATION. There is no pending or, to the Company's knowledge,
threatened, action, suit or other proceeding to which the Company is a party or
to which its property or assets are subject that is not disclosed in the SEC
Documents that is required to be so disclosed.

           5.9 GOVERNMENTAL CONSENTS. No consent, approval, order or
authorization of, or registration, qualification, designation, declaration or
filing with, any federal, state, or local governmental authority on the part of
the Company is required in connection with the consummation of the transactions
contemplated by this Agreement except for compliance with the securities and
blue sky laws in the states and other jurisdictions in which Securities are
offered and/or sold, which compliance will be effected in accordance with such
laws.

           5.10 NO MATERIAL ADVERSE CHANGE. Except as otherwise disclosed
herein, since June 30, 2002, there have not been any changes in the assets,
liabilities, financial condition or operations of the Company from that
reflected in the Company's Form 10-Q for the period ended June 30, 2002 except
changes in the ordinary course of business or which have not been, either
individually or in the aggregate, materially adverse.

           5.11 SECURITIES VIOLATIONS. The Company represents and warrants that
none of its directors or officers is or has within the last five years, been the
subject of, or a defendant in: (i) an enforcement action or prosecution (or
settlement in lieu thereof) brought by a governmental authority relating to a
violation of securities, tax, fiduciary or criminal laws, or (ii) a civil action
(or settlement in lieu thereof) brought by shareholders or investors in a common
investment vehicle for violation of duties owed to the shareholders or
investors.

           5.12 NASDAQ. The Company's Common Stock is listed on The Nasdaq
National Market and the Company shall use its commercially reasonable efforts to
maintain such listing.

           5.13 OFFERING VALID. Assuming the accuracy of the representations and
warranties of the Purchaser contained in Section 5.1 hereof, the offer and
issuance of the



                                        4
<PAGE>

Securities will be exempt from the registration requirements of the Securities
Act of 1933, as amended (the "SECURITIES ACT"), and will have been registered or
qualified (or are exempt from registration and qualification) under the
registration, permit or qualification requirements of all applicable state
securities laws. Neither the Company nor any agent on its behalf has solicited
or will solicit any offers to sell or has offered to sell or will offer to sell
all or any part of the Securities to any person or persons so as to bring the
sale of such Securities by the Company within the registration provisions of the
Securities Act or any state securities laws.

        6. REPRESENTATIONS, WARRANTIES AND COVENANTS OF THE PURCHASER.

           6.1 The Purchaser represents and warrants to and covenants with the
Company that:

               (a) The Purchaser, taking into account the personnel and
resources it can practically bring to bear on the purchase of the Securities
contemplated hereby, either alone or together with the advice of the Purchaser's
representative, is knowledgeable, sophisticated and experienced in making, and
is qualified to make, decisions with respect to investments in securities
presenting an investment decision like that involved in the purchase of the
Securities, including investments in securities issued by the Company, and has
requested, received, reviewed and considered, either alone or with the
Purchaser's representative, all information the Purchaser deems relevant
(including the SEC Documents) in making an informed decision to purchase the
Securities.

               (b) The Purchaser is acquiring the Securities being acquired by
the Purchaser pursuant to this Agreement for its own account for investment only
and with no present intention of distributing any of such Securities or any
arrangement or understanding with any other persons regarding the distribution
of such Securities, except in compliance with Section 6.1(c).

               (c) The Purchaser will not, directly or indirectly, offer, sell,
pledge, transfer or otherwise dispose of (or solicit any offers to buy, purchase
or otherwise acquire or take a pledge of) any of the Securities purchased
hereunder except in compliance with the Securities Act, applicable blue sky
laws, and the rules and regulations promulgated thereunder.

               (d) The Purchaser is an "accredited investor" within the meaning
of Rule 501 of Regulation D promulgated under the Securities Act.

               (e) The Purchaser has full right, power, authority and capacity
to enter into this Agreement and to consummate the transactions contemplated
hereby and has taken all necessary action to authorize the execution, delivery
and performance of this Agreement. Upon the execution and delivery of this
Agreement by the Purchaser, this Agreement shall constitute a valid and binding
obligation of the Purchaser, enforceable in accordance with its terms, except
(i) as limited by applicable bankruptcy, insolvency, reorganization, moratorium
or similar laws relating to or affecting the enforcement of creditors' rights
generally, (ii) as limited by equitable principles generally, including any
specific performance, and (iii) as to those provisions of Section 10.7 relating
to indemnity or contribution.


                                       5
<PAGE>

           6.2 The Purchaser represents and warrants to and covenants with the
Company that it has not engaged in any short sales of the Company's Common Stock
within the three (3) month period prior to the Closing Date.

           6.3 The Purchaser understands that nothing in the SEC Documents, this
Agreement or any other materials presented to the Purchaser in connection with
the purchase and sale of the Securities constitutes legal, tax or investment
advice and that independent legal counsel has reviewed these documents and
materials on the Purchaser's behalf. The Purchaser has consulted such legal, tax
and investment advisors as it, in its sole discretion, has deemed necessary or
appropriate in connection with its purchase of the Securities.

        7. SURVIVAL OF REPRESENTATIONS, WARRANTIES AND AGREEMENTS, DISCLAIMER,
INDEMNIFICATION.

           7.1 SURVIVAL. Notwithstanding any investigation made by any party to
this Agreement, all covenants, agreements, representations and warranties made
by the Company and the Purchaser herein and in the certificates for the
securities delivered pursuant hereto shall survive for a period of two years
after the execution of this Agreement, the delivery to the Purchaser of the
Securities being purchased and the payment therefore.

           7.2 DISCLAIMER. EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT,
NEITHER PARTY MAKES ANY REPRESENTATION OR WARRANTY TO THE OTHER PARTY OF ANY
NATURE, EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTY OF
NONINFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

           7.3 LIMITATION OF LIABILITY. NEITHER PARTY SHALL BE ENTITLED TO
RECOVER FROM THE OTHER PARTY ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL OR PUNITIVE
DAMAGES IN CONNECTION WITH THIS AGREEMENT.

        8. CONDITIONS TO COMPANY'S OBLIGATIONS AT CLOSING. The Company's
obligation to sell, issue and deliver the Securities to the Purchaser at the
Closing shall be subject to the following conditions to the extent not waived by
the Company:

           8.1 RECEIPT OF PAYMENT. The Company shall have received payment
within seven (7) days, by check or wire transfer of immediately available funds,
in the full amount of the Total Purchase Price.

           8.2 REPRESENTATIONS, WARRANTIES AND COVENANTS. The representations
and warranties made by the Purchaser in Section 6 hereof shall be true and
correct when made at the Closing. The Purchaser shall have performed and
complied with all obligations and conditions required to be performed and
complied with by the Purchaser under this Agreement on or prior to the Closing.



                                       6
<PAGE>

        9. CONDITIONS TO PURCHASERS' OBLIGATIONS AT CLOSING. The Purchaser's
obligation to accept delivery of and pay for the Securities at the Closing shall
be subject to the following conditions to the extent not waived by such
Purchaser:

           9.1 ISSUANCE OF STOCK. The Purchaser shall have received evidence of
the issuance of a certificate representing the Securities in the name of the
Purchaser.

           9.2 REPRESENTATIONS, WARRANTIES AND COVENANTS. The representations
and warranties made by the Company in Section 5 hereof shall be true and correct
when made at the Closing. The Company shall have performed and complied with all
obligations and conditions to be performed and complied with by the Company
under this Agreement on or prior to the Closing.

        10. RESTRICTIONS ON TRANSFER; REGISTRATION RIGHTS.

            10.1 CERTAIN DEFINITIONS. When used in this Section 10 of this
Agreement, the following terms shall have the following respective meanings:

                  (a) "FORM S-3" shall mean Form S-3 under the Securities Act as
in effect on the date of this Agreement, or any substantially similar,
equivalent or successor form under the Securities Act.

                  (b) "HOLDER" shall mean the Purchaser and each of its
permitted assigns under Section 9.2(c) then holding any Securities.

                  (c) "REGISTRATION EXPENSES" shall mean all expenses incurred
by the Company in complying with Sections 10.3 and 10.4 hereof, including,
without limitation, all registration, qualification and filing fees, printing
expenses, escrow fees, fees and disbursements of counsel to the Company, blue
sky fees and expenses, and the expense of any special audits incident to or
required by any such registration (but excluding the compensation of regular
employees of the Company which shall be paid in any event by the Company).

                  (d) "SELLING EXPENSES" shall mean all underwriting discounts
and selling commissions and fees and disbursements of counsel applicable to the
applicable sale.

                  (e) "SPECIAL REGISTRATION STATEMENT" shall mean (i) a
registration statement relating to any employee benefit plan or (ii) a
registration statement relating to any corporate reorganization or transaction
under Rule 145 of the Securities Act, including any registration statements
related to the resale of securities issued in such a transaction or (iii) a
registration statement related to stock issued upon conversion of debt
securities.

            10.2 RESTRICTIONS ON TRANSFER.

                  (a) The Purchaser agrees not to make any disposition of all or
any portion of the Securities unless and until:



                                       7
<PAGE>

                      (i) There is then in effect a registration statement under
the Securities Act covering such proposed disposition and such disposition is
made in accordance with such registration statement; or

                      (ii) (A) Except in connection with a sale exempt from
registration under Rule 144, the transferee has agreed in writing to be bound by
the terms of this Agreement, and (B) if reasonably requested by the Company, the
Purchaser shall have furnished the Company with an opinion of counsel,
reasonably satisfactory to the Company, that such disposition will not require
registration of such securities under the Securities Act, provided that the
Company will not require an opinion of counsel for transactions pursuant to Rule
144 except in unusual circumstances.

                      (iii) Notwithstanding the provisions of paragraphs (a)(i)
and (a)(ii) above, no such registration statement or opinion of counsel shall be
necessary for a transfer by the Purchaser (or its permitted transferee) to the
extent such transfer is made by (A) a partnership to its partners or former
partners in accordance with partnership interests, (B) a limited liability
company to its members or former members in accordance with their interest in
the limited liability company, or (C) a corporation to a subsidiary of which it
owns at least eighty percent (80%) of the capital stock or a parent corporation
that owns at least eighty percent (80%) of the capital stock of the Purchaser.

                  (b) Each certificate representing Securities shall be stamped
or otherwise imprinted with a legend substantially similar to the following (in
addition to any legend required under applicable state securities laws, as
provided elsewhere in this Agreement or any other applicable agreement or
instrument):

        "THESE SECURITIES HAVE NOT BEEN REGISTERED UNDER THE
        SECURITIES ACT OF 1933, AS AMENDED. THEY MAY NOT BE OFFERED
        FOR SALE, PLEDGED OR HYPOTHECATED IN THE ABSENCE OF AN
        EFFECTIVE REGISTRATION STATEMENT AS TO THE SECURITIES UNDER
        SAID ACT OR UNLESS THE COMPANY HAS RECEIVED AN OPINION OF
        COUNSEL SATISFACTORY TO THE COMPANY THAT SUCH REGISTRATION IS
        NOT REQUIRED."

        The Company shall be obligated to reissue promptly unlegended
certificates at the request of the Purchaser if the Purchaser shall have
obtained an opinion of counsel (which counsel may be counsel to the Company)
reasonably acceptable to the Company to the effect that the securities proposed
to be disposed of may lawfully be so disposed of (with no need for compliance
with Rule 144) without registration, qualification or legend.

        Any legend endorsed on an instrument pursuant to applicable state
securities laws and the stop-transfer instructions with respect to such
securities shall be removed upon receipt by the Company of an order of the
appropriate blue sky authority authorizing such removal.



                                       8
<PAGE>

                  (c) The registration rights granted under Section 10.3 of this
Agreement shall not be transferable except in connection with transfers
permitted under Section 10.2(a)(iii).

           10.3 REGISTRATION PROCEDURES. The Company is obligated to do the
following:

                  (a) The Company shall use commercially reasonable efforts to
prepare and file with the SEC, no later than thirty (30) days following the
Closing Date, one or more registration statements in order to register with the
SEC the resale by the Holders, from time to time, of the Securities through
Nasdaq or the facilities of any national securities exchange on which the Common
Stock is then traded, or in privately negotiated transactions (a "REGISTRATION
STATEMENT"). The Company shall use commercially reasonable efforts to cause such
Registration Statement to be declared effective within one hundred fifty (150)
days following the Closing Date. The Company shall promptly notify the Holders
of the effectiveness of such Registration Statement.

                  (b) The Company shall prepare and file with the SEC (i) such
amendments and supplements to the Registration Statement and the prospectus used
in connection therewith, (ii) such SEC Documents and (iii) such other filings
required by the SEC, in each case as may be necessary to keep the Registration
Statement continuously effective and not misleading until all of the Securities
held by the Holders that are registered under such Registration Statement have
been resold. Notwithstanding the foregoing, if, at any time following the
effectiveness of a Registration Statement, the Company shall have determined
that the Company may be required to disclose any material corporate development,
the Company may suspend the effectiveness of a Registration Statement until such
time as an amendment to such Registration Statement has been filed by the
Company and declared effective by the SEC or until such time as the Company has
filed an appropriate report with the SEC pursuant to the Exchange Act, which
suspension shall endure for such period as deemed necessary by the Company upon
advice of counsel (a "SUSPENSION PERIOD"), by giving notice to the Holders. The
Company will use commercially reasonable efforts to limit the length of any
Suspension Period to a reasonable period of time (anticipated to be no more then
ninety (90) days except to the extent a longer period is required due to
extenuating circumstances), and further, the Company will use reasonable efforts
to amend or supplement such prospectus in order to cause such prospectus not to
include any untrue statement of a material fact or omit to state a material fact
required to be stated therein or necessary to make the statements therein not
misleading in the light of the circumstances then existing and end the
Suspension Period. Each Holder agrees that, upon receipt of any notice from the
Company of a Suspension Period, the Holder will not sell any Securities pursuant
to the Registration Statement until (i) the Holder is advised in writing by the
Company that the use of the applicable prospectus may be resumed, (ii) the
Holder has received copies of any additional or supplemental or amended
prospectus, if applicable, and (iii) the Holder has received copies of any
additional or supplemental filings which are incorporated or deemed to be
incorporated by reference in such prospectus.

                  (c) In order to facilitate the public sale or other
disposition of all or any of the Securities by the Holders, the Company shall
furnish to the Holders with respect to the Securities registered under a
Registration Statement such number of copies of prospectuses,



                                       9
<PAGE>


prospectus supplements and preliminary prospectuses as the Holders reasonably
request in conformity with the requirements of the Securities Act.

                  (d) The Company shall file any documents required of the
Company for normal blue sky clearance in states specified in writing by the
Holders; provided, however, that the Company shall not be required to qualify to
do business or consent to service of process in any jurisdiction in which it is
not now so qualified or has not so consented.

                  (e) The Company shall furnish to the Holders copies of
reasonably complete drafts of all such documents proposed to be filed (including
exhibits), and any such holder shall have the opportunity to object to any
information pertaining solely to such Holder that is contained therein and the
Company will make the corrections reasonably requested by such holder with
respect to such information prior to filing any such registration statement or
amendment.

                  (f) The Company shall promptly notify each Holder and the
underwriter or underwriters, if any:

                      (i)  when such registration statement or any prospectus
                           used in connection therewith, or any amendment or
                           supplement thereto, has been filed and, with respect
                           to such registration statement or any post-effective
                           amendment thereto, when the same has become
                           effective;

                      (ii) of any written comments from the Commission with
                           respect to any filing referred to in clause (i) or of
                           any written request by the Commission for amendments
                           or supplements to such registration statement or
                           prospectus.


                  (g) The Company shall use its best efforts to cause all
Securities covered by such registration statement to be registered with or
approved by such other United States governmental agencies or authorities as may
be necessary to enable each holder thereof to consummate the disposition of such
Securities.

                  (h) In connection with any underwritten public offering of the
Securities, the Company shall furnish to each Holder a signed counterpart,
addressed to such holder (and the underwriters),



                                       10
<PAGE>

                      (i)  an opinion of counsel for the Company, dated the
                           effective date of the underwriting agreement,
                           reasonably satisfactory in form and substance to such
                           holder, and

                      (ii) a "comfort" letter, dated the effective date of such
                           registration statement (and a bring-down comfort
                           letter) dated the date of any closing under the
                           underwriting agreement), signed by the independent
                           public accountants who have certified the Company's
                           financial statements included in such registration
                           statement,

        in each case covering substantially the same matters with respect to
        such registration statement (and the prospectus included therein) and,
        in the case of the accountants' letter, with respect to events
        subsequent to the date of such financial statements, as are customarily
        covered in opinions of issuer's counsel and in accountants' letters
        delivered to the underwriters in underwritten Public Offerings of
        securities and, in the case of the accountants' letter, such other
        financial matters, as such holder (or the underwriters) may reasonably
        request.

           (i) The Company shall provide a transfer agent and registrar for all
Securities covered by such registration statement not later than the effective
date of such registration statement.


           10.4 EXPENSES OF REGISTRATION. Except as specifically provided
herein, all Registration Expenses incurred in connection with any registration
under Section 10.3 herein shall be borne by the Company. All Selling Expenses
incurred in connection with any registrations hereunder, shall be borne by the
Holders.

           10.5 TERMINATION OF REGISTRATION RIGHTS. All registration rights
granted to the Holders under this Section 10 shall terminate and be of no
further force and effect upon the date that all Registrable Securities held by
the Holders may be sold under Rule 144(k) during any ninety (90) day period.

           10.6 FURNISHING INFORMATION. It shall be a condition precedent to the
obligations of the Company to take any action pursuant to Section 10.3 that each
Holder shall furnish to the Company such information regarding itself, the
Securities held by the Holder and the intended method of disposition of such
securities as shall be required to effect the registration of the Securities.

As soon as practicable following the Closing Date, the Company shall Deliver a
questionnaire (a "Questionnaire") to each Holder requesting, among other things,
the following information regarding the Holder: (i) legal name, address,
telephone and fax number, (ii) beneficial ownership of the Securities to be
registered and other securities of the Company held by Holder, (iii)
relationships with the Company, and (iv) intended plan of distribution of the
Securities to be registered. If a properly completed and signed Questionnaire is
received by the Company not later than 10 business days after receipt thereof by
the Holder, the Holder delivering such questionnaire shall be entitled to have
its Securities included in the Registration Statement.



                                       11
<PAGE>

           10.7 INDEMNIFICATION. In the event any Securities are included in a
Registration Statement under Section 10.3:

                  (a) To the extent permitted by law, the Company will indemnify
and hold harmless the Holders, the partners, officers, directors and legal
counsel of the Holders, any underwriter (as defined in the Securities Act) for
the Holders and each person, if any, who controls the Holder or underwriter
within the meaning of the Securities Act or the Exchange Act, against any
losses, claims, damages, expenses (including attorney fees) or liabilities
(joint or several) to which they may become subject under the Securities Act,
the Exchange Act or other federal or state law, insofar as such losses, claims,
damages or liabilities (or actions in respect thereof) arise out of or are based
upon any of the following statements, omissions or violations (collectively a
"VIOLATION") by the Company: (i) any untrue statement or alleged untrue
statement of a material fact contained in such Registration Statement, including
any preliminary prospectus or final prospectus contained therein or any
amendments or supplements thereto; (ii) the omission or alleged omission to
state therein a material fact required to be stated therein, or necessary to
make the statements therein not misleading; or (iii) any violation or alleged
violation by the Company of the Securities Act, the Exchange Act, any state
securities law or any rule or regulation promulgated under the Securities Act,
the Exchange Act or any state securities law in connection with the offering
covered by such Registration Statement; and the Company will reimburse the
Holders and each such partner, officer or director, underwriter or controlling
person for any legal or other expenses reasonably incurred by them in connection
with investigating or defending any such loss, claim, damage, liability or
action; provided however, that the indemnity agreement contained in this Section
10.7(a) shall not apply to amounts paid in settlement of any such loss, claim,
damage, liability or action if such settlement is effected without the consent
of the Company, which consent shall not be unreasonably withheld, nor shall the
Company be liable in any such case for any such loss, claim, damage, liability
or action to the extent that it arises out of or is based upon a Violation which
occurs in reliance upon and in conformity with written information furnished
expressly for use in connection with such registration by the Holders or any
such partner, officer, director, underwriter or controlling person of the
Holders.

                  (b) To the extent permitted by law, the Holders will, if
Securities held by the Holders are included in the securities as to which such
registration, qualifications or compliance is being effected, indemnify and hold
harmless the Company, each of its directors, its officers and legal counsel and
each person, if any, who controls the Company within the meaning of the
Securities Act, any underwriter and any other Holder selling securities under
such Registration Statement or any of such other Holder's partners, directors or
officers or any person who controls the Holder, against any losses, claims,
damages, expenses (including attorney fees), or liabilities (several) to which
the Company or any such director, officer, counsel, controlling person,
underwriter or other such Holder, or partner, director, officer or controlling
person of such other Holder may become subject under the Securities Act, the
Exchange Act or other federal or state law, insofar as such losses, claims,
damages or liabilities (or actions in respect thereto) arise out of or are based
upon any Violation, in each case to the extent (and only to the extent) that
such Violation occurs in reliance upon and in conformity with written
information furnished by the Holders under an instrument duly executed by the
Holders and stated to be specifically for use in connection with such
registration; and the Holders will



                                       12
<PAGE>

reimburse any legal or other expenses reasonably incurred by the Company or any
such director, officer, counsel, controlling person, underwriter or other
Holder, or partner, officer, director or controlling person of such other Holder
in connection with investigating or defending any such loss, claim, damage,
liability or action if it is judicially determined that there was such a
Violation; provided, however, that the indemnity agreement contained in this
Section 10.7(b) shall not apply to amounts paid in settlement of any such loss,
claim, damage, liability or action if such settlement is effected without the
consent of the Holder, which consent shall not be unreasonably withheld;
provided further, that in no event shall any indemnity under this Section
10.7(b) exceed the proceeds from the offering received by the Holder.

                  (c) Promptly after receipt by an indemnified party under this
Section 10.7 of notice of the commencement of any action (including any
governmental action), such indemnified party will, if a claim in respect thereof
is to be made against any indemnifying party under this Section 10.7, deliver to
the indemnifying party a written notice of the commencement thereof and the
indemnifying party shall have the right to participate in, and, to the extent
the indemnifying party so desires, jointly with any other indemnifying party
similarly noticed, to assume the defense thereof with counsel mutually
satisfactory to the parties; provided, however, that an indemnified party shall
have the right to retain its own counsel, with the fees and expenses to be paid
by the indemnifying party, if representation of such indemnified party by the
counsel retained by the indemnifying party would be inappropriate due to actual
or potential differing interests between such indemnified party and any other
party represented by such counsel in such proceeding. The failure to deliver
written notice to the indemnifying party within a reasonable time of the
commencement of any such action, if materially prejudicial to its ability to
defend such action, shall relieve such indemnifying party of any liability to
the indemnified party under this Section 10.7, but the omission so to deliver
written notice to the indemnifying party will not relieve it of any liability
that it may have to any indemnified party otherwise than under this Section
10.7.

                  (d) If the indemnification provided for in this Section 10.7
is held by a court of competent jurisdiction to be unavailable to an indemnified
party with respect to any losses, claims, damages or liabilities referred to
herein, the indemnifying party, in lieu of indemnifying such indemnified party
thereunder, shall to the extent permitted by applicable law contribute to the
amount paid or payable by such indemnified party as a result of such loss,
claim, damage or liability in such proportion as is appropriate to reflect the
relative fault of the indemnifying party on the one hand and of the indemnified
party on the other in connection with the Violation(s) that resulted in such
loss, claim, damage or liability, as well as any other relevant equitable
considerations. The relative fault of the indemnifying party and of the
indemnified party shall be determined by a court of law by reference to, among
other things, whether the untrue or alleged untrue statement of a material fact
or the omission to state a material fact relates to information supplied by the
indemnifying party or by the indemnified party and the parties' relative intent,
knowledge, access to information and opportunity to correct or prevent such
statement or omission; provided, that in no event shall any contribution by the
Purchaser hereunder exceed the proceeds from the offering received by the
Holders.

                  (e) The obligations of the Company and the Holders under this
Section 10.7 shall survive completion of any offering of Registrable Securities
in a Registration Statement. No indemnifying party, in the defense of any such
claim or litigation, shall, except



                                       13
<PAGE>

with the consent of each indemnified party, consent to entry of any judgment or
enter into any settlement which does not include as an unconditional term
thereof the giving by the claimant or plaintiff to such indemnified party of a
release from all liability in respect to such claim or litigation.

        11. MISCELLANEOUS.

            11.1 BROKER'S FEE. The Company and the Purchaser hereby represent
that, other than Leerink Swann & Company, UBS Warburg and CIBC World Markets, to
whom the Company will pay commissions in connection with the sale of the
Securities and Additional Securities pursuant to heretofore executed engagement
letters, there are no brokers or finders entitled to compensation in connection
with the sale of the Securities; and the Company and the Purchaser shall
indemnify each other for any such fees for which they are responsible.

            11.2 NOTICES. All notices, requests, consents and other
communications hereunder shall be in writing, shall be sent by confirmed
facsimile or mailed by first-class registered or certified airmail, or
nationally recognized overnight express courier, postage prepaid, and shall be
deemed given when so sent in the case of facsimile transmission, or when so
received in the case of mail or courier, and addressed as follows:

                 (a)  if to the Company, to:

                      ViroLogic, Inc.
                      270 East Grand Avenue
                      South San Francisco, CA  94080
                      Attention: General Counsel
                      Fax No.:  650-635-0397

                 with a copy to (which copy shall not constitute notice
                 hereunder):

                      Cooley Godward LLP
                      4401 Eastgate Mall
                      San Diego, CA  92121
                      Attention:  Carl R. Sanchez, Esq.
                      Fax No.:  858-550-6420

or to such other person at such other place as the Company shall designate to
the Purchaser in writing; and

                 (b) if to the Purchaser, to:

                      Pfizer, Inc.
                      235 East 42nd Street
                      New York, NY 10017
                      Attention: _______________
                      Fax No.:  ________________



                                       14
<PAGE>

or to such other person at such other place as the Purchaser shall designate to
the Company in writing.

            11.3 WAIVERS AND AMENDMENTS. Neither this Agreement nor any
provision hereof may be changed, waived, discharged, terminated, modified or
amended except upon the written consent of the Company and the Purchaser.

            11.4 HEADINGS. The headings of the various sections of this
Agreement have been inserted for convenience of reference only and shall not be
deemed to be part of this Agreement.

            11.5 SEVERABILITY. In case any provision contained in this Agreement
should be invalid, illegal or unenforceable in any respect, the validity,
legality and enforceability of the remaining provisions contained herein shall
not in any way be affected or impaired thereby.

            11.6 GOVERNING LAW. This Agreement shall be governed by and
construed in accordance with the laws of the State of New York, without regard
to conflicts of law principles.

            11.7 COUNTERPARTS. This Agreement may be executed in two or more
counterparts, each of which shall constitute an original, but all of which, when
taken together, shall constitute but one instrument, and shall become effective
when one or more counterparts have been signed by each party hereto and
delivered to the other parties.

            11.8 SUCCESSORS AND ASSIGNS. Except as otherwise expressly provided
herein, the provisions hereof shall inure to the benefit of, and be binding
upon, the successors, assigns, heirs, executors and administrators of the
parties hereto.

            11.9 PAYMENT OF FEES AND EXPENSES. Each of the Company and the
Purchaser shall bear its own expenses and legal fees incurred on its behalf with
respect to this Agreement and the transactions contemplated hereby. If any
action at law or in equity is necessary to enforce or interpret the terms of
this Agreement, the prevailing party shall be entitled to reasonable attorney's
fees, costs and necessary disbursements in addition to any other relief to which
such party may be entitled.

                           [SIGNATURE PAGE TO FOLLOW]



                                       15
<PAGE>

        IN WITNESS WHEREOF, the parties hereto have caused this Stock Purchase
Agreement to be executed by their duly authorized representatives as of the day
and year first above written.


                                         VIROLOGIC, INC.


                                         By: /s/ WILLIAM D. YOUNG
                                             ---------------------------------
                                             William D. Young
                                             Chief Executive Officer


                                         PFIZER IRELAND PHARMACEUTICALS


                                         By:  ILLEGIBLE
                                             ---------------------------------
                                         Name:
                                              --------------------------------


                                       16