Quite frankly -
Hwy 99W and Hwy 26 suck.
Hwy 18 isn't a whole lot better.
Here's an Oregon Traffic Volume Map -
Picking a straight line on a map can be very risky -
Primarily because most people driving do, too.
If the road has good shoulders, you will be fairly safe -
But have mondo traffic to deal with.
If there are no shoulders it will be a nightmare.
The three most important variables are -
1. Traffic volume
2. Shoulder width
Other variables are -
5. Lines of sight - i.e. curves, trees
6. Pavement condition
Obviously, we would all like to have the perfect road for cycling -
An empty road with great pavement and gentle grades.
Some variables mitigate others -
For ex. - if there is no traffic, you really don't need shoulders.
If traffic moves slowly, then curves are less of an issue.
If you really don't have to go to Portland, then Salem is a better destination on the train.
Salem has baggage service and is much easier to bike out of - maybe via Wheatland Ferry?
(Not to mention that you will be getting in in the afternoon in either Portland or Salem.)
Or, you can take the train to Portland and ride out to Manzanita via Scappoose, Mist and Jewell.
(South of US 26 you follow the Nehalem River on a Nehalem River Rd - mostly paved.)