'Validate an interval file using the bx GenomicIntervalReader'

def validate(self, dataset):

    errors = list()
    (c, s, e, t) = (dataset.metadata.chromCol, dataset.metadata.startCol, dataset.metadata.endCol, dataset.metadata.strandCol)
    (c, s, e, t) = ((int(c) - 1), (int(s) - 1), (int(e) - 1), (int(t) - 1))
    infile = open(dataset.file_name, 'r')
    reader = GenomicIntervalReader(infile, chrom_col=c, start_col=s, end_col=e, strand_col=t)
    while True:
        try:
            next(reader)
        except ParseError as e:
            errors.append(e)
        except StopIteration:
            infile.close()
            return errors
