def shorten_dataset(filename_in, filename_out, nlines=100000):
    """Reads first nlines lines of Combosaurus data from filename_in
       and writes shortened data to filename_out
    """
    with open(filename_in) as fin, open(filename_out, 'w') as fout:
        for line in fin.readlines():
            fout.write(line)
            nlines -= 1
            if nlines == 0:
                return
