'Set the number of sequences and the number of data lines
in dataset.'

def set_meta(self, dataset, **kwd):

    if ((self.max_optional_metadata_filesize >= 0) and (dataset.get_size() > self.max_optional_metadata_filesize)):
        dataset.metadata.data_lines = None
        dataset.metadata.sequences = None
        dataset.metadata.seconday_structures = None
        return
    data_lines = 0
    sequences = 0
    for line in open(dataset.file_name):
        line = line.strip()
        data_lines += 1
        if (line and line.startswith('>')):
            sequences += 1
    dataset.metadata.data_lines = data_lines
    dataset.metadata.sequences = sequences
