The only rule for bass is that it should cause some low vibration when played loud enough.
The bass line could be a melody, it could be a percussive element, it could even be the bottom end of some esoteric sound effects.
My favourite basslines have a very strong relationship with the kick and have a fairly steady relationship with other percussion.
Ultimately it will have some of the strongest influence on how your track moves, whether you have a single droning note as is common in ambient all the way up to galloping trance b-lines or something extra funky and glitched out.
I like to keep my music funky so I make a midi pattern on my bass track as if I was programming hi hats where the kick drum is the accent hit. Note length is so important to me, then comes velocity. After that you may not even require any melodic movement.
On the flipside if our harmonic content comes first or the track has a more atmospheric droney feel, maybe you should think of your bass as more of a pad? Harmonise it with something up top and have any movement you require by detuning Osc's or automating your filters.
Maybe you can just use nice low tom samples?
Sidechain your kick to some thunder?
Pitch your voice down?
Essentially there are no rules and the only person who can tell you it's wrong...