As a cyclist, the last thing you want to deal with is an accident. You ride your bike to enjoy the weather and to get where you want to go. You don't ride it to open yourself up to injury.
You have rights, just as someone with a vehicle does. You have the right to be on the roads and to have other drivers and cyclists respect your right-of-way. In return, you must follow the traffic laws and be aware of ways to avoid a collision, too.
One problem cyclists face is dooring. Dooring is a type of accident that typically only happens to motorcyclists or cyclists, because the person inside the parked vehicle doesn't see him or her coming or doesn't look for that kind of vehicle before opening his or her door. Dooring has the potential to cause a head-on collision, which could lead to serious injuries or death.
When a person opens a door in your path, you need to take evasive action. It's vital that you anticipate that dooring can happen at any time. Be prepared to come to a rapid stop without swerving; if you swerve, you could enter another lane of traffic and get hit.
To avoid dooring, try to stay far enough into the lane to be out of reach if someone were to throw open a door. You have a right to be in the lane. Dooring is illegal in many states, so if you're hit, you can file a claim to obtain compensation. Drivers have a responsibility to look before they open their doors into a lane.
Source: Bicycling.com, "Don't Get Doored: How to Ride Safely Around Parked Cars," Bob Mionske, accessed Oct. 13, 2017