code: def tointerval(s):
      
      if isinstance(s, basestring):
          m = coord_re.search(s)
          if m.group('strand'):
              return pybedtools.create_interval_from_list([
                  m.group('chrom'),
                  m.group('start'),
                  m.group('stop'),
                  '.',
                  '0',
                  m.group('strand')])
          else:
              return pybedtools.create_interval_from_list([
                  m.group('chrom'),
                  m.group('start'),
                  m.group('stop'),
              ])
      return s
docs: If string, then convert to an interval; otherwise just return the input