@classmethod
def from_string(cls, loc, **kws):
    """ Create an interval from a chrx:start-end style string """
    toks = loc.split(':')
    chrom = toks[0]
    start, end = map(int, toks[1].split('-'))
    if len(toks) == 3:
        try:
            strand = int(toks[2])
        except ValueError:
            strand = toks[2]
            if strand == '+':
                strand = 1
            elif strand == '-':
                strand = -1
            elif strand == '':
                strand = None
            else:
                raise Exception('Unknown strand %s' % strand)
    else:
        strand = None
    return cls(start, end, chrom=chrom, strand=strand, **kws)
