San Francisco-based First Republic , which was purchased by Merrill Lynch in 2007 for $ 1.7 billion , largely stayed clear of sub-prime mortgages and other toxic assets that have crippled other banks .