I would spend some time learning your scales. Once you figure out some right notes, you can find out the key and therefore know the corresponding scale. Once you know the scale you can pretty much bang out different bass lines using those notes and eventually youll find one you like.
Sometimes you can just find your bass line by knowing one note, once you figure one note that goes with a note in the sample, play with keys around that note try different variations and rhythms - sometimes one line might sound like garbage but when you play the same notes in a different rhythm it sounds better.
i dunno just my 2 cents, kind of how i do it sorry if its confusing.