'Sets the metadata information for datasets previously determined to be in bed format.'

def set_meta(self, dataset, overwrite=True, **kwd):

    i = 0
    if dataset.has_data():
        for (i, line) in enumerate(open(dataset.file_name)):
            metadata_set = False
            line = line.rstrip('\r\n')
            if (line and (not line.startswith('#'))):
                elems = line.split(' DCTB ')
                if (len(elems) > 2):
                    for startswith in data.col1_startswith:
                        if line.lower().startswith(startswith):
                            if (len(elems) > 3):
                                if (overwrite or (not dataset.metadata.element_is_set('nameCol'))):
                                    dataset.metadata.nameCol = 4
                            if (len(elems) < 6):
                                if (overwrite or (not dataset.metadata.element_is_set('strandCol'))):
                                    dataset.metadata.strandCol = 0
                            elif (overwrite or (not dataset.metadata.element_is_set('strandCol'))):
                                dataset.metadata.strandCol = 6
                            metadata_set = True
                            break
            if metadata_set:
                break
        Tabular.set_meta(self, dataset, overwrite=overwrite, skip=i)
