The Coastal Starlight runs from Union Station in DTLA to Jack London Square in Oakland. From there, it's a quick walk to BART to get into San Francisco - no bus required.
That being said, the trip takes 13 hours and some change, depending where in SF you're trying to go - which would be blown out of the water by HSR.