<PAGE>   1
                                                                     EXHIBIT 4.7

THE SECURITIES REPRESENTED BY THIS INSTRUMENT HAVE BEEN ACQUIRED FOR INVESTMENT
AND NOT WITH VIEW TO, OR IN CONNECTION WITH, THE SALE OR DISTRIBUTION THEREOF.
NO SUCH SALE OR DISPOSITION MAY BE EFFECTED WITHOUT AN EFFECTIVE REGISTRATION
STATEMENT RELATED THERETO OR AN OPINION OF COUNSEL REASONABLY ACCEPTABLE TO THE
COMPANY THAT SUCH REGISTRATION IS NOT REQUIRED UNDER THE SECURITIES ACT OF 1933.

No. W-__

                             STOCK PURCHASE WARRANT
                     To Purchase Shares of Common Stock of
                                VIROLOGIC, INC.

     THIS CERTIFIES that pursuant to the First Amendment dated December 17,
1997, to that certain lease (the "Lease") between Virologic, Inc. (the
"Company") and Britannia Developments, Inc. ("Landlord") dated August 27, 1997,
and upon the terms and subject to the conditions hereinafter set forth,
________________________________________ ("Holder") may at any time or on or
after the date of this Warrant and on or prior to August 10, 2003, but not
thereafter, to subscribe for and purchase, from the Company, up to ___ shares of
Common Stock. The purchase price of one share of Common Stock issuable under
this Warrant shall be $4.00. The purchase price and the number of shares for
which the Warrant is exercisable shall be subject to adjustment as provided
herein.

     1.   Exercise of Warrant.

          (a)  Cash Exercise. Unless earlier terminated under Section 7, the
purchase rights represented by this Warrant are exercisable by Holder, in whole
or in part, at any time after the date hereof and before the close of business
on August 10, 2003 by the surrender of this Warrant and the Notice of Exercise
annexed hereto duly executed at the office of the Company, in South San
Francisco, California (or such other office or agency of the Company as it may
designate by notice in writing to the registered holder hereof at the address
of such holder appearing on the books of the Company), and upon payment of the
purchase price of the shares of Common Sock thereby purchased (by cash or by
check or bank draft payable to the order of the Company in an amount equal to
the purchase price of the shares thereby purchased); whereupon the holder of
this Warrant shall be entitled to receive a certificate for the number of
shares of Common Stock so purchased. The Company agrees that if at the time of
the surrender of this Warrant and purchase of the shares, the holder hereof
shall be entitled to exercise this Warrant, and the shares so purchased shall
be and be deemed to be issued to such holder as the record owner of such shares
as of the close of business on the date on which this Warrant shall have been
exercised as aforesaid.

     Certificates for shares of Common Stock purchased hereunder shall be
delivered to the holder hereof within a reasonable time after the date on which
this Warrant shall have been exercised as aforesaid.







<PAGE>   2
          (b)  Net Exercise. In lieu of the cash payment set forth in Section
1(a) above and provided that the Company has effected a public offering of its
Common Stock, the Holder shall have the right, to convert this Warrant in its
entirety (without payment of any kind) into that number of shares of Common
Stock equal to the quotient obtained by dividing the Net Value (as defined
below) of the shares of Common Stock then exercisable under this Warrant by the
Fair Market Value (as defined below) of one share of Common Stock. For purposes
of this Section 1(b), (i) the Fair Market Value of Common Stock means the
average of the closing prices quoted on the National Association of Securities
Dealers Automated Quotation System ("NASDAQ") National Market System ("NMS")
(or, if then traded on a national securities exchange, the closing prices on the
principal national securities exchange on which it is listed or, if quoted on
NASDAQ, the average of the closing bid and asked prices) on each of the twenty
(20) trading days immediately preceding the date of exercise; and (ii) the Net
Value of the shares means the aggregate Fair Market Value of the shares of
Common Stock then exercisable under this Warrant minus the aggregate purchase
price for the shares of Common Stock then exercisable under this Warrant.

     2.   No Fractional Shares or Scrip. No fractional shares or scrip
representing fractional shares shall be issued upon the exercise of this
Warrant. With respect to any fraction of a share called for upon the exercise of
this Warrant, an amount equal to such fraction multiplied by the then current
price at which each share may be purchased hereunder shall be paid in cash to
the holder of this Warrant.

     3.   Charges, Taxes and Expenses. Issuance of certificates for shares to be
received upon the exercise of this Warrant shall be made without charge to the
holder hereof for any issue or transfer tax or other incidental expense in
respect of the issuance of such certificate, all of which taxes and expenses
shall be paid by the Company, and such certificates shall be issued in the name
of the holder of this Warrant.

     4.   No Rights as Stockholders. This Warrant does not entitle the holder
hereof to any voting rights or other rights as a stockholder of the Company
prior to the exercise thereof.

     5.   Loss, Theft, Destruction or Mutilation of Warrant. Upon receipt by the
Company of evidence reasonably satisfactory to it of the loss, theft,
destruction or mutilation of this Warrant, and in case of loss, theft or
destruction, of indemnity or security reasonably satisfactory to it, and upon
reimbursement to the Company of all reasonable expenses incidental thereto, and
upon surrender and cancellation of this Warrant, if mutilated, the Company will
make and deliver a new Warrant of like tenor and dated as of such cancellation,
in lieu of this Warrant.

     6.   Saturdays, Sundays, Holidays, etc. If the last or appointed day for
the taking of any action or the expiration of any right required or granted
herein shall be a Saturday or a Sunday or shall be a legal holiday, then such
action may be taken or such right may be exercised on the next succeeding day
not a legal holiday.

     7.   Early Termination and Dilution.

                                      -2-
<PAGE>   3
          (a)  Early Termination on Merger, etc. If at any time the Company
proposes to merge with or into any other corporation, effect a reorganization,
or sell or convey all or substantially all of its assets to any other entity in
a transaction in which the stockholders of the Company immediately before the
transaction own immediately after the transaction less than a majority of the
outstanding voting securities of the surviving entity (or its parent), then the
Company shall give the undersigned at least thirty (30) days notice of the
proposed effective date of the transaction and, if the Warrant has not been
exercised by the effective date of the transaction, the Warrant shall terminate.
The exercise of this Warrant may be conditioned upon the effectiveness of the
transaction.

          (b)  Reclassification, etc. If the Company at any time shall, by
subdivision, conversion, combination or reclassification of securities or
otherwise, change any of the securities to which purchase rights under this
Warrant exist into the same or a different number of securities of any class or
classes, this Warrant shall thereafter be to acquire such number and kind of
securities as would have been issuable as the result of such change with respect
to the securities which were subject to the purchase rights under this Warrant
immediately prior to such subdivision, combination, reclassification or other
change. If shares of the Company's Common Stock are subdivided or combined into
a greater or smaller number of shares of Common Stock, the purchase price under
this Warrant shall be proportionately reduced in case of subdivision of shares
of proportionately increased in the case of combination of shares, in both cases
by the ratio which the total number of shares of Common Stock to be outstanding
immediately after such event bears to the total number of shares of Common Stock
outstanding immediately prior to such event.

          (c)  Cash Distributions. No adjustment on account of cash dividends or
interest on the Company's Common Stock or other securities purchasable hereunder
will be made to the purchase price under this Warrant.

          (d)  Authorized Shares. The Company covenants that during the period
the Warrant is outstanding, it will reserve from its authorized and unissued
Common Stock a sufficient number of shares to provide for the issuance of Common
Stock upon the exercise of any purchase rights under this Warrant. The Company
further covenants that its issuance of this Warrant shall constitute full
authority to its officers who are charged with the duty of executing stock
certificates to execute and issue the necessary certificates for shares of the
Company's Common Stock upon the exercise of the purchase rights under this
Warrant.

     8.   Miscellaneous.

          (a)  Issue Date. The provisions of this Warrant shall be construed and
shall be given effect in all respect as if it had been issued and delivered by
the Company on the date hereof. This Warrant shall be binding upon any
successors or assigns of the Company. This Warrant shall constitute a contract
under the laws of the State of California and for all purposes shall be
construed in accordance with and governed by the laws of said state.

                                      -3-
<PAGE>   4

     (b)  Restrictions. The holder hereof acknowledges that the shares acquired
upon the exercise of this Warrant may have restrictions upon its resale imposed
by state and federal securities laws.

     (c)  Waivers and Amendments. This Warrant and any provisions hereof may be
changed, waived, discharged or terminated only by an instrument in writing
signed by the party against which enforcement of the same is sought.

     (d)  Assignment and Transferability. This Warrant may not be assigned or
transferred without the prior written approval of the Company. Following an
assignment, the Company shall, without charge, execute and deliver a new
Warrant or Warrants dated as of the date hereof and registered in the name of
the assignee or assignees named in such instrument of assignment (any such
assignee will then be a "holder" for purposes of this Warrant) and, if holder's
entire interest is not being assigned, in the name of holder, and this Warrant
shall promptly be canceled.

     (e)  Market Stand Off. The undersigned holder of this Warrant hereby
agrees that, for a period of 180 days following the effective date of a
registration statement of the Company for its initial public offering filed
pursuant to the Securities act of 1933, it shall not to the extent requested by
the Company and its underwriter sell or otherwise transfer or dispose of (other
than to donees who agree to be similarly bound) any Common Stock received upon
exercise of this Warrant. The undersigned holder of this Warrant further agrees
to enter into an agreement with the Company's underwriter for its initial
public offering which evidences the foregoing covenant. In order to enforce the
foregoing covenants, the Company may impose stop-transfer instructions with its
transfer agent.

     IN WITNESS WHEREOF, the undersigned have caused this Warrant to be
executed by its officers thereunto duly authorized.

Dated: August __, 1998




                                        VIROLOGIC, INC.

                                        By: /s/ MARTIN H. GOLDSTEIN
                                            ---------------------------------

                                        Title: Pres & CEO
                                               ------------------------------

Holder:                                  Address: 220 E. Grand Ave.
                                                ----------------------------
 By:                                            S. San Francisco, CA
     ---------------------------------

                                      -4-
<PAGE>   5

                               NOTICE OF EXERCISE


To: ___________________________________


     (1)  The undersigned hereby elects to purchase ________ shares of Common
Stock of Virologic, Inc. pursuant to the terms of the attached Warrant, and
tenders herewith payment of the purchase price in full, together with all
applicable transfer taxes, if any.

     (2)  Please issue a certificate of certificates representing said shares
of Common Stock in the name of the undersigned as is specified below:


                         _____________________________
                                     (Name)


                         _____________________________
                                   (Address)


     (3)  The undersigned represents that the aforesaid shares of Common Stock
are being acquired for the account of the undersigned for investment and not
with a view to, or for resale in connection with, the distribution thereof and
that the undersigned has no present intention of distributing or reselling such
shares.


_____________________________           ________________________________________
     (Date)                                          (Signature)