Rewrite to use seqgen instead of ms.to.bases