Ocean shows a foolproof way to write a bassline in Logic Pro: just pull it from the chords already in your track. The bass notes are the lowest notes of each chord, so there's no guesswork about what will fit harmonically.
When the source is a sampled stab and the low end isn't obvious, throw an EQ on it and cut the highs until only the bass frequency is left to hear.
Once the bassline is written, Ocean sidechains it to the kick using Kickstart so the bass ducks slightly on every hit. That carves out room for the kick to punch through instead of fighting the bass for the same low-end space.