F on transcript, replaced- admissions issue?

Hi all,
I’m hoping I can get some sound advice about my situation.
I’m currently a sophomore at a community college in California.
My major is Molecular and Cellular Biology and I intend to transfer to a UC.
Recently, I had no choice but to fail a class because I was not able to make it to the final (due to sudden health issues+a trip to the ER). Beforehand, I was doing well in the class and was expecting an A.

If I retake the class and get an A, will this still affect my admissions at a UC (particularly UCSD, UCB, UCLA).
And will this affect my admission chances when the time comes for me to apply to graduate schools?

Thanks all