def originstr(sequence):
    """formats dna sequence as broken, numbered lines ala genbank"""
    wordlen = 10
    cols = 6
    rowlen = wordlen * cols
    outstr = ''
    for linenum in range(int(len(sequence) / rowlen) + 1):
        pos = linenum * rowlen
        outstr += (' ' * 9 + str(pos + 1))[-9:] + ' ' + sequence[pos:pos + 10
            ] + ' ' + sequence[pos + 10:pos + 20] + ' ' + sequence[pos + 20
            :pos + 30] + ' ' + sequence[pos + 30:pos + 40] + ' ' + sequence[
            pos + 40:pos + 50] + ' ' + sequence[pos + 50:pos + 60] + '\n'
    return outstr
