Again, though, Harold, the OP was not on a bicycle. He was on a motorcycle:
(Bolding added.) So the OP had to follow the rules for motorcycles. Under the laws of NY, motorcycle drivers are held to almost all of the same laws that car drivers are. See NY Vehicle and Traffic Law (VTL) § 1250, which states:
§ 1250. Traffic laws apply to persons operating motorcycles. Every person operating a motorcycle shall be granted all of the rights and shall be subject to all of the duties applicable to the driver of any other vehicle under this title, except as to special regulations in this article and except as to those provisions of this title which by their nature can have no application.
As to use of the lanes in NY, VTL § 1252 states the following:
§ 1252. Operating motorcycles on roadways laned for traffic. (a) All motorcycles are entitled to full use of a lane and no motor vehicle or motorcycle shall be driven in such a manner as to deprive any motorcycle of the full use of a lane. However, this subsection shall not beconstrued to prevent motorcycles from being operated two abreast in as single lane.
(b) The operator of a motorcycle shall not overtake and pass in the same lane occupied by the vehicle being overtaken.
(c) No person shall operate a motorcycle between lanes of traffic or between adjacent lines or rows of vehicles.
(d) Motorcycles shall not be operated more than two abreast in asingle lane.
(e) Subsections (b) and (c) shall not apply to police officers in theperformance of their official duties.
(Bolding added). As you can see from the bolded subsections (b) & (c), a motorcycle in NY may NOT pass a vehicle in the same lane as the other vehicle nor may a motorcycle operate between lanes of traffic. So the OP was violating this section by being in the position he was. Thus, as I said earlier, he was in a spot he was not supposed to be, and thus at least part of the fault here lies with the OP.
In your state that may be true. I haven't looked. But in NY, as it applies to motorcycles, about 99% of the vehicle code does apply to them.

